UNPKG

@sikka/hawa

Version:

Modern UI Kit made with Tailwind

1,225 lines (1,200 loc) • 75.9 kB
"use client"; "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // blocks/pricing/index.ts var pricing_exports = {}; __export(pricing_exports, { ComparingPlans: () => ComparingPlans, HorizontalPricing: () => HorizontalPricing, PricingPlans: () => PricingPlans }); module.exports = __toCommonJS(pricing_exports); // blocks/pricing/PricingPlans.tsx var import_react14 = __toESM(require("react")); // blocks/cards/ActionCard.tsx var import_react = __toESM(require("react")); // blocks/cards/AdCard.tsx var import_react2 = __toESM(require("react")); // util/index.ts var import_clsx = require("clsx"); var import_tailwind_merge = require("tailwind-merge"); function cn(...inputs) { return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs)); } // blocks/cards/PricingCard.tsx var import_react8 = __toESM(require("react")); // elements/button/Button.tsx var React7 = __toESM(require("react")); var import_class_variance_authority = require("class-variance-authority"); // elements/helperText/HelperText.tsx var import_react3 = __toESM(require("react")); var HelperText = ({ helperText }) => /* @__PURE__ */ import_react3.default.createElement( "p", { className: cn( "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all", helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0" ) }, helperText ); // elements/label/Label.tsx var React5 = __toESM(require("react")); // elements/tooltip/Tooltip.tsx var import_react4 = __toESM(require("react")); var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip")); var TooltipContent = import_react4.default.forwardRef(({ className, sideOffset = 4, size = "default", ...props }, ref) => /* @__PURE__ */ import_react4.default.createElement( TooltipPrimitive.Content, { ref, sideOffset, className: cn( "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2", { "hawa-text-xs": size === "small", "hawa-text-xl": size === "large" }, className ), ...props } )); TooltipContent.displayName = TooltipPrimitive.Content.displayName; var TooltipArrow = import_react4.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ import_react4.default.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props })); TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName; var Tooltip = ({ side, size, open, content, children, disabled, defaultOpen, onOpenChange, triggerProps, contentProps, providerProps, delayDuration = 300, ...props }) => { return /* @__PURE__ */ import_react4.default.createElement( TooltipPrimitive.TooltipProvider, { delayDuration, ...providerProps }, /* @__PURE__ */ import_react4.default.createElement( TooltipPrimitive.Root, { open: !disabled && open, defaultOpen, onOpenChange, ...props }, /* @__PURE__ */ import_react4.default.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children), /* @__PURE__ */ import_react4.default.createElement( TooltipContent, { size, side, align: "center", ...contentProps, style: { ...contentProps == null ? void 0 : contentProps.style, maxWidth: "var(--radix-tooltip-content-available-width)", maxHeight: "var(--radix-tooltip-content-available-height)" } }, content ) ) ); }; // elements/label/Label.tsx var Label = React5.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React5.createElement( "label", { ref, className: cn( "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70", className ), ...props }, children, required && /* @__PURE__ */ React5.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*") ), hint && /* @__PURE__ */ React5.createElement( Tooltip, { content: hint, side: hintSide, triggerProps: { tabIndex: -1, onClick: (event) => event.preventDefault() } }, /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement( "svg", { xmlns: "http://www.w3.org/2000/svg", className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React5.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React5.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }), /* @__PURE__ */ React5.createElement("path", { d: "M12 17h.01" }) )) ))); Label.displayName = "Label"; // elements/loading/Loading.tsx var import_react5 = __toESM(require("react")); var Loading = ({ design = "spinner", size = "normal", themeMode = "light", classNames, color, ...props }) => { let sizeStyles = { button: "hawa-h-4 hawa-w-4", xs: "hawa-h-1 hawa-w-1", sm: "hawa-h-6 hawa-w-6", normal: "hawa-h-8 hawa-w-8", lg: "hawa-h-14 hawa-w-14", xl: "hawa-h-24 hawa-w-24" }; let progressSizes = { button: "hawa-h-1", xs: "hawa-h-1 hawa-w-1", sm: "hawa-h-6 hawa-w-6", normal: "", lg: "hawa-h-6", xl: "hawa-h-10 hawa-w-64" }; let animationStyles = { pulse: "hawa-animate-in hawa-fade-in hawa-duration-1000", bounce: "hawa-animate-bounce" }; switch (design.split("-")[0]) { case "dots": return /* @__PURE__ */ import_react5.default.createElement( "div", { className: cn( "hawa-flex hawa-flex-row hawa-gap-2", classNames == null ? void 0 : classNames.container ) }, /* @__PURE__ */ import_react5.default.createElement( "div", { className: cn( "hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary" ) } ), /* @__PURE__ */ import_react5.default.createElement( "div", { className: cn( "hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary" ) } ), /* @__PURE__ */ import_react5.default.createElement( "div", { className: cn( "hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite", size === "button" ? "hawa-h-2 hawa-w-2" : sizeStyles[size], animationStyles[design.split("-")[1]], color ? color : "hawa-bg-primary" ) } ) ); case "square": return /* @__PURE__ */ import_react5.default.createElement( "svg", { className: cn( "squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container ), viewBox: "0 0 35 35", height: "35", width: "35" }, /* @__PURE__ */ import_react5.default.createElement( "rect", { className: "squircle-track", x: "2.5", y: "2.5", fill: "none", strokeWidth: "5px", width: "32.5", height: "32.5" } ), /* @__PURE__ */ import_react5.default.createElement( "rect", { className: "square-car", x: "2.5", y: "2.5", fill: "none", strokeWidth: "5px", width: "32.5", height: "32.5", pathLength: "100" } ) ); case "squircle": return /* @__PURE__ */ import_react5.default.createElement( "svg", { x: "0px", y: "0px", viewBox: "0 0 37 37", height: "37", width: "37", preserveAspectRatio: "xMidYMid meet", className: cn( "squircle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container ) }, /* @__PURE__ */ import_react5.default.createElement( "path", { className: cn("squircle-track", classNames == null ? void 0 : classNames.track), fill: "none", strokeWidth: "5", pathLength: "100", d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5" } ), /* @__PURE__ */ import_react5.default.createElement( "path", { className: cn("squircle-car", classNames == null ? void 0 : classNames.car), fill: "none", strokeWidth: "5", pathLength: "100", d: "M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5" } ) ); case "progress": return /* @__PURE__ */ import_react5.default.createElement( "div", { className: cn( "progress-loading after:hawa-rounded hawa-rounded", progressSizes[size], classNames == null ? void 0 : classNames.container ) } ); case "orbit": return /* @__PURE__ */ import_react5.default.createElement("div", { className: cn("orbit-container", classNames == null ? void 0 : classNames.container) }); default: return /* @__PURE__ */ import_react5.default.createElement( "svg", { viewBox: "0 0 40 40", height: "40", width: "40", className: cn( "circle-container", sizeStyles[size], classNames == null ? void 0 : classNames.container ) }, /* @__PURE__ */ import_react5.default.createElement( "circle", { className: cn( "circle-track", { "hawa-stroke-primary-foreground": themeMode === "dark", "hawa-stroke-primary": themeMode === "light" }, classNames == null ? void 0 : classNames.track ), cx: "20", cy: "20", r: "17.5", fill: "none", strokeWidth: "5px", pathLength: "100" } ), /* @__PURE__ */ import_react5.default.createElement( "circle", { className: cn( "circle-car", { "hawa-stroke-primary-foreground": themeMode === "dark", "hawa-stroke-primary": themeMode === "light" }, classNames == null ? void 0 : classNames.car ), cx: "20", cy: "20", r: "17.5", fill: "none", pathLength: "100", strokeWidth: "5px" } ) ); } }; // elements/button/Button.tsx var buttonVariants = (0, import_class_variance_authority.cva)( "hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50", { variants: { variant: { default: "hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90", light: "hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40", destructive: "hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90", outline: "hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground", secondary: "hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80", ghost: "hover:hawa-bg-accent hover:hawa-text-accent-foreground", link: "hawa-text-primary hawa-underline-offset-4 hover:hawa-underline", combobox: "hawa-bg-background hawa-border", neoBrutalism: "neo-brutalism" // "hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active", }, size: { default: "hawa-h-10 hawa-px-4 hawa-py-2", heightless: "hawa-px-4 hawa-py-4", xs: "hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 ", sm: "hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3", lg: "hawa-h-11 hawa-rounded-md hawa-px-8", xl: "hawa-h-14 hawa-rounded-md hawa-px-10", icon: "hawa-h-10 hawa-w-10", smallIcon: "hawa-h-7 hawa-w-7" } }, defaultVariants: { variant: "default", size: "default" } } ); var Button = React7.forwardRef( ({ className, label, variant, size, asChild = false, centered = true, isLoading, children, labelProps, showHelperText = false, asInput = false, ...props }, ref) => { const Comp = "button"; const loadingColor = variant === "outline" || variant === "ghost" || variant === "neoBrutalism" ? "hawa-bg-primary" : "hawa-bg-primary-foreground"; if (asInput) { return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, label && /* @__PURE__ */ React7.createElement(Label, { ...labelProps }, label), /* @__PURE__ */ React7.createElement( Comp, { className: cn( buttonVariants({ variant, size, className }), centered && "hawa-justify-center" ), ref, ...props }, isLoading ? /* @__PURE__ */ React7.createElement( Loading, { design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse", themeMode: variant === "outline" ? "light" : "dark", color: loadingColor, size: size === "sm" || size === "xs" ? "xs" : "button" } ) : children ), showHelperText && /* @__PURE__ */ React7.createElement(HelperText, { helperText: props.helperText })); } else { return /* @__PURE__ */ React7.createElement( Comp, { className: cn( buttonVariants({ variant, size, className }), centered && "hawa-justify-center" ), ref, ...props }, isLoading ? /* @__PURE__ */ React7.createElement( Loading, { design: size === "icon" || size === "smallIcon" ? "spinner" : "dots-pulse", themeMode: variant === "outline" ? "light" : "dark", color: loadingColor, size: size === "sm" || size === "xs" ? "xs" : "button" } ) : children ); } } ); Button.displayName = "Button"; // elements/card/Card.tsx var React8 = __toESM(require("react")); var Card = React8.forwardRef( ({ className, variant = "default", clickable = false, asContainer = false, ...props }, ref) => { let variantStyles = { default: cn( "hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm", clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow" ), neoBrutalism: cn( "neo-brutalism", // "hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]", clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active" ) }; return /* @__PURE__ */ React8.createElement( "div", { ref, className: cn(className, !asContainer && variantStyles[variant]), ...props } ); } ); var CardHeader = React8.forwardRef( ({ className, ...props }, ref) => /* @__PURE__ */ React8.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-between" }, /* @__PURE__ */ React8.createElement( "div", { ref, className: cn( "hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6", className ), ...props } ), props.actions && /* @__PURE__ */ React8.createElement("div", { className: "hawa-p-6" }, props.actions)) ); var CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React8.createElement( "h3", { ref, className: cn("hawa-text-2xl hawa-font-semibold", className), ...props } )); var CardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React8.createElement( "p", { ref, className: cn("hawa-text-sm hawa-text-muted-foreground", className), ...props } )); var CardContent = React8.forwardRef( ({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React8.createElement( "div", { ref, className: cn( noPadding ? "hawa-p-0" : "hawa-p-6", headless ? "hawa-pt-6" : "hawa-pt-0", className ), ...props } ) ); var CardFooter = React8.forwardRef(({ className, noPadding, ...props }, ref) => /* @__PURE__ */ React8.createElement( "div", { ref, className: cn( noPadding ? "hawa-p-0" : "hawa-p-6", "hawa-flex hawa-items-center hawa-pt-0", className ), ...props } )); CardDescription.displayName = "CardDescription"; CardContent.displayName = "CardContent"; CardHeader.displayName = "CardHeader"; CardFooter.displayName = "CardFooter"; CardTitle.displayName = "CardTitle"; Card.displayName = "Card"; // elements/separator/Separator.tsx var React9 = __toESM(require("react")); var Separator = ({ className, orientation = "horizontal", ...props }) => /* @__PURE__ */ React9.createElement( "div", { className: cn( "hawa-shrink-0 hawa-bg-border", orientation === "horizontal" ? "hawa-h-[1px] hawa-w-full" : "hawa-h-full hawa-w-[1px]", className ), ...props } ); // elements/skeleton/Skeleton.tsx var import_react6 = __toESM(require("react")); function Skeleton({ className, content, animation = "pulse", fade, ...props }) { const animationStyles = { none: "hawa-rounded hawa-bg-muted", pulse: "hawa-animate-pulse hawa-rounded hawa-bg-muted", shimmer: "hawa-space-y-5 hawa-rounded hawa-bg-muted hawa-p-4 hawa-relative before:hawa-absolute before:hawa-inset-0 before:hawa--translate-x-full before:hawa-animate-[shimmer_2s_infinite] before:hawa-bg-gradient-to-r before:hawa-from-transparent before:hawa-via-gray-300/40 dark:before:hawa-via-white/10 before:hawa-to-transparent hawa-isolate hawa-overflow-hidden before:hawa-border-t before:hawa-border-rose-100/10" }; const fadeStyle = { bottom: "hawa-mask-fade-bottom", top: "hawa-mask-fade-top", right: "hawa-mask-fade-right", left: "hawa-mask-fade-left " }; return /* @__PURE__ */ import_react6.default.createElement( "div", { className: cn( animationStyles[animation], content && "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center", fade && fadeStyle[fade], className ), ...props }, content && content ); } // elements/chip/Chip.tsx var import_react7 = __toESM(require("react")); var Chip = import_react7.default.forwardRef( ({ label, size = "normal", icon, color, radius = "inherit", dot, dotStatus = "none", ...rest }, ref) => { let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold "; let radiusStyles = { inherit: " hawa-rounded", full: "hawa-rounded-full", none: "hawa-rounded-none" }; let sizeStyles = { small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ", normal: "hawa-h-fit hawa-text-xs", large: "hawa-text-base" }; let dotStyles = { small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full", normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full", large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full" }; let dotStatusStyles = { none: "hawa-bg-gray-500 dark:hawa-bg-gray-800", available: "hawa-bg-green-500", unavailable: "hawa-bg-red-500" }; let colorStyles = { green: "hawa-bg-green-200 hawa-text-green-700 dark:hawa-bg-green-700 dark:hawa-text-green-200", blue: "hawa-bg-blue-200 hawa-text-blue-700 dark:hawa-bg-blue-700 dark:hawa-text-blue-100", red: "hawa-bg-red-200 hawa-text-red-700 dark:hawa-bg-red-700 dark:hawa-text-red-100", yellow: "hawa-bg-yellow-200 hawa-text-yellow-700 dark:hawa-bg-yellow-600 dark:hawa-text-black", orange: "hawa-bg-orange-200 hawa-text-orange-700 dark:hawa-bg-orange-700 dark:hawa-text-orange-100", purple: "hawa-bg-purple-200 hawa-text-purple-700 dark:hawa-bg-purple-700 dark:hawa-text-purple-100", cyan: "hawa-bg-cyan-200 hawa-text-cyan-700 dark:hawa-bg-cyan-700 dark:hawa-text-cyan-100", hyper: "hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ", oceanic: "hawa-text-white dark:hawa-text-black hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600" }; if (label) { return /* @__PURE__ */ import_react7.default.createElement( "span", { ...rest, ref, className: cn( defaultStyles, sizeStyles[size], radiusStyles[radius], color ? colorStyles[color] : "hawa-border hawa-bg-none", rest.className ) }, dot && /* @__PURE__ */ import_react7.default.createElement( "span", { className: cn(dotStyles[size], dotStatusStyles[dotStatus]) } ), icon && icon, label ); } else { return /* @__PURE__ */ import_react7.default.createElement( "span", { ...rest, ref, className: cn( "hawa-h-2 hawa-w-2 hawa-rounded-full", color ? colorStyles[color] : "hawa-border hawa-bg-none" ) } ); } } ); // blocks/cards/PricingCard.tsx var PricingCard = ({ size = "medium", direction = "ltr", endButton = true, recommended, currentPlan = false, ...props }) => { var _a, _b, _c, _d, _e, _f, _g, _h, _i; let cardSizes = { small: "hawa-w-full hawa-max-w-sm hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background", medium: "hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background", large: "hawa-w-full hawa-max-w-lg hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background" }; return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, props.isLoadingCard ? /* @__PURE__ */ import_react8.default.createElement( Skeleton, { className: cn(cardSizes[size], "hawa-h-[200px]"), fade: "bottom" } ) : /* @__PURE__ */ import_react8.default.createElement( Card, { dir: direction, className: cn( currentPlan ? "hawa-border-2 hawa-border-primary dark:hawa-border-primary/70" : "hawa-border", cardSizes[size], "hawa-relative hawa-flex hawa-flex-col hawa-justify-between hawa-gap-4 hawa-p-4", recommended ? "hawa-rounded hawa-rounded-t-none" : "hawa-rounded" ) }, recommended && /* @__PURE__ */ import_react8.default.createElement( "div", { className: "hawa-absolute -hawa-left-[1px] hawa-top-0 -hawa-translate-y-full hawa-rounded-t hawa-border hawa-bg-primary hawa-p-2 hawa-text-center hawa-text-primary-foreground", style: { width: "calc(100% + 2px)" } }, ((_a = props.texts) == null ? void 0 : _a.recommended) || "RECOMMENDED" ), /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-h-full hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-text-md hawa-relative hawa-flex hawa-flex-col hawa-justify-between hawa-font-bold hawa-text-primary/70" }, /* @__PURE__ */ import_react8.default.createElement("span", null, (_b = props.texts) == null ? void 0 : _b.title), /* @__PURE__ */ import_react8.default.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, (_c = props.texts) == null ? void 0 : _c.subtitle), props.discount && /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-absolute hawa-end-0" }, /* @__PURE__ */ import_react8.default.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }))), /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-items-baseline hawa-text-primary" }, props.isLoadingPrice ? /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[48px] hawa-w-full hawa-max-w-[200px] hawa-p-0" }) : /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, props.noPrice ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, ((_d = props.texts) == null ? void 0 : _d.priceless) || "Contact Us") : /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-end hawa-gap-2" }, props.oldPrice && props.oldPrice > 0 && /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-line-through hawa-opacity-70" }, props.oldPrice + " " + ((_e = props.texts) == null ? void 0 : _e.currencyText)), /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price)), /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, (_f = props.texts) == null ? void 0 : _f.currencyText)), /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-ml-1 hawa-whitespace-nowrap hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", (_g = props.texts) == null ? void 0 : _g.cycleText)))), endButton && /* @__PURE__ */ import_react8.default.createElement(Separator, null), /* @__PURE__ */ import_react8.default.createElement( "div", { className: cn( "hawa-flex hawa-h-full hawa-justify-between hawa-gap-4", endButton ? "hawa-flex-col" : "hawa-flex-col-reverse" ) }, props.features && /* @__PURE__ */ import_react8.default.createElement("ul", { role: "list", className: "hawa-space-y-0 hawa-overflow-x-auto" }, (_h = props.features) == null ? void 0 : _h.map((feature, o) => { var _a2; return /* @__PURE__ */ import_react8.default.createElement( "li", { key: o, className: cn( "hawa-flex hawa-flex-row hawa-justify-between hawa-gap-2", !feature.included && "hawa-line-through" ) }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center" }, feature.included ? /* @__PURE__ */ import_react8.default.createElement( "svg", { "aria-label": "Check Icon", "aria-hidden": "true", className: "hawa-m-2 hawa-h-5 hawa-w-5 hawa-flex-shrink-0 hawa-text-primary", fill: "currentColor", viewBox: "0 0 20 20" }, /* @__PURE__ */ import_react8.default.createElement( "path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" } ) ) : /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-m-2 hawa-mx-2.5 hawa-h-4 hawa-w-4 hawa-rounded-full hawa-bg-primary/10" }), /* @__PURE__ */ import_react8.default.createElement("span", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-whitespace-nowrap hawa-text-start hawa-font-normal hawa-leading-tight hawa-text-primary/70" }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react8.default.createElement( Chip, { label: ((_a2 = props.texts) == null ? void 0 : _a2.soon) || "", color: "oceanic", size: "small" } ))), feature.hint && /* @__PURE__ */ import_react8.default.createElement( Tooltip, { content: feature.hint, side: feature.hintSide }, /* @__PURE__ */ import_react8.default.createElement( "svg", { xmlns: "http://www.w3.org/2000/svg", className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react8.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ import_react8.default.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }), /* @__PURE__ */ import_react8.default.createElement("path", { d: "M12 17h.01" }) ) ) ); })), /* @__PURE__ */ import_react8.default.createElement( Button, { onClick: props.onPlanClicked, disabled: currentPlan, className: "hawa-w-full" }, (_i = props.texts) == null ? void 0 : _i.buttonText ) )) )); }; // blocks/cards/ItemCard.tsx var import_react11 = __toESM(require("react")); // elements/dropdownMenu/DropdownMenu.tsx var React13 = __toESM(require("react")); var import_react9 = require("@headlessui/react"); var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu")); var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.SubTrigger, { ref, className: cn( "hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent", inset && "hawa-pl-8", className ), ...props }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children), " ", /* @__PURE__ */ React13.createElement( "svg", { "aria-label": "Chevron Right Icon", stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 16 16", height: "1em", width: "1em", className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "") }, /* @__PURE__ */ React13.createElement( "path", { fillRule: "evenodd", d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" } ) ) )); DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; var DropdownMenuSubContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.SubContent, { ref, className: cn( "hawa-z-50 hawa-min-w-[8rem] hawa-gap-1 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2", className ), ...props } )); DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName; var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React13.createElement(import_react9.Portal, null, /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.Content, { ref, sideOffset, className: cn( "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-md data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2", className ), ...props } ))); DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; var DropdownMenuItem = React13.forwardRef(({ className, inset, badged, slug, LinkComponent = "a", ...props }, ref) => { return /* @__PURE__ */ React13.createElement(LinkComponent, { href: slug }, /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.Item, { disabled: props.disabled, ref, className: cn( "hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50", inset && "hawa-pl-8", props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6", className ), ...props }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, props.children), props.end && props.end, !props.end && props.shortcut && /* @__PURE__ */ React13.createElement(DropdownMenuShortcut, null, props.shortcut), !props.end && badged && /* @__PURE__ */ React13.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" }) )); }); DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.CheckboxItem, { ref, className: cn( "hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50", className ), checked, ...props }, /* @__PURE__ */ React13.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React13.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React13.createElement( "svg", { "aria-label": "Check Mark", stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 512 512", height: "0.60em", width: "0.60em" }, /* @__PURE__ */ React13.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }) ), " ")), children )); DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName; var DropdownMenuRadioItem = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.RadioItem, { ref, className: cn( "hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50", className ), ...props }, /* @__PURE__ */ React13.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React13.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React13.createElement( "svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", "aria-label": "Circle", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "hawa-h-2 hawa-w-2 hawa-fill-current" }, /* @__PURE__ */ React13.createElement("circle", { cx: "12", cy: "12", r: "10" }) ))), children )); DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.Label, { ref, className: cn( "hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold", inset && "hawa-pl-8", className ), ...props } )); DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement( DropdownMenuPrimitive.Separator, { ref, className: cn("hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted", className), ...props } )); DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; var DropdownMenuShortcut = ({ className, ...props }) => { return /* @__PURE__ */ React13.createElement( "span", { className: cn( "hawa-text-xs hawa-tracking-widest hawa-opacity-60", className ), ...props } ); }; DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; // elements/stopPropagationWrapper/StopPropagationWrapper.tsx var import_react10 = __toESM(require("react")); // blocks/cards/LandingCard.tsx var import_react12 = __toESM(require("react")); // elements/radio/Radio.tsx var import_react13 = __toESM(require("react")); // elements/popover/Popover.tsx var React17 = __toESM(require("react")); var PopoverPrimitive = __toESM(require("@radix-ui/react-popover")); var PopoverContent = React17.forwardRef( ({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React17.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React17.createElement( PopoverPrimitive.Content, { ref, align, sideOffset, className: cn( "dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2", className ), ...props } )) ); PopoverContent.displayName = PopoverPrimitive.Content.displayName; var PopoverTrigger = PopoverPrimitive.Trigger; var PopoverRoot = PopoverPrimitive.Root; // elements/radio/Radio.tsx var Radio = (0, import_react13.forwardRef)( ({ design = "default", width = "default", size = "default", orientation = "horizontal", name, labelProps, tabsContainerClassName, forceHideHelperText = false, onChange, containerClassNames, ...props }, ref) => { var _a, _b, _c; let activeTabStyle = "hawa-inline-block hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary"; let inactiveTabStyle = `hawa-inline-block hawa-w-full hawa-transition-all hawa-bg-primary-foreground dark:hover:hawa-text-white ${props.disabled ? "" : "hover:hawa-bg-muted"}`; let orientationStyle = { horizontal: "hawa-flex hawa-flex-row", vertical: "hawa-flex hawa-flex-col" }; let tabSizeStyle = { default: "hawa-py-2 hawa-px-4 hawa-text-sm", lg: "hawa-py-2 hawa-px-4", sm: "hawa-p-1.5 hawa-text-xs", xs: "hawa-p-1 hawa-text-[10px]" }; let widthStyle = { none: "", default: "hawa-max-w-fit", full: "hawa-w-full" }; const [parentDirection, setParentDirection] = import_react13.default.useState( null ); const [selectedOption, setSelectedOption] = (0, import_react13.useState)( props.defaultValue || props.value ); const [openTooltip, setOpenTooltip] = (0, import_react13.useState)(null); const parentRef = (0, import_react13.useRef)(null); (0, import_react13.useEffect)(() => { var _a2; const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode; if (parentNode) { const dir = window.getComputedStyle(parentNode).direction; setParentDirection(dir); } }); const handleChange = (opt) => { setSelectedOption(opt.value); if (onChange) { onChange(opt.value); } else { console.log("onChange was not provided"); } }; const radio_option_tabs_styling = [ "hawa-w-full hawa-last hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-2 ", !props.disabled && "hawa-cursor-pointer", orientation === "horizontal" && parentDirection === "ltr" && "hawa-rounded-none first:hawa-rounded-l last:hawa-rounded-r", orientation === "horizontal" && parentDirection === "rtl" && "hawa-rounded-none first:hawa-rounded-r last:hawa-rounded-l", orientation === "vertical" && "hawa-rounded-none first:hawa-rounded-t last:hawa-rounded-b", tabSizeStyle[size] ]; switch (design) { case "tabs": return /* @__PURE__ */ import_react13.default.createElement( "div", { className: cn( "hawa-gap-2 hawa-flex hawa-flex-col", containerClassNames == null ? void 0 : containerClassNames.tabs ) }, props.label && /* @__PURE__ */ import_react13.default.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ import_react13.default.createElement( "ul", { ref: parentRef, className: cn( props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "", "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-font-medium hawa-h-[40px]", orientationStyle[orientation], widthStyle[width], tabsContainerClassName ) }, (_b = props.options) == null ? void 0 : _b.map((opt, o) => { return opt.tooltip ? /* @__PURE__ */ import_react13.default.createElement( PopoverRoot, { key: o, open: o === openTooltip, onOpenChange: (bool) => setOpenTooltip(bool ? o : null) }, /* @__PURE__ */ import_react13.default.createElement( PopoverTrigger, { onMouseEnter: () => setOpenTooltip(o), onMouseLeave: () => setOpenTooltip(null), asChild: true }, /* @__PURE__ */ import_react13.default.createElement( "li", { "aria-current": "page", onClick: () => { if (props.disabled || opt.disabled) return; handleChange(opt); }, className: cn( ...radio_option_tabs_styling, selectedOption === opt.value ? activeTabStyle : inactiveTabStyle ) }, opt.icon && opt.icon, opt.label ) ), /* @__PURE__ */ import_react13.default.createElement(PopoverContent, { ...opt.tooltipContentProps }, opt.tooltip) ) : /* @__PURE__ */ import_react13.default.createElement( "li", { key: o, "aria-current": "page", onClick: () => { if (props.disabled || opt.disabled) return; handleChange(opt); }, className: cn( ...radio_option_tabs_styling, selectedOption === opt.value ? activeTabStyle : inactiveTabStyle ) }, opt.icon && opt.icon, opt.label ); }) ), !forceHideHelperText && /* @__PURE__ */ import_react13.default.createElement(HelperText, { helperText: props.helperText }) ); case "bordered": return /* @__PURE__ */ import_react13.default.createElement( "div", { className: cn( orientationStyle[orientation], "hawa-gap-4", containerClassNames == null ? void 0 : containerClassNames.bordered ) }, props.options && props.options.map((opt, i) => /* @__PURE__ */ import_react13.default.createElement("div", { key: i, className: "hawa-w-full hawa-rounded hawa-border" }, /* @__PURE__ */ import_react13.default.creat