"use client";
import { cn } from "./index3.js";
import { cva } from "class-variance-authority";
import * as React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/components/molecules/data/Kbd/Kbd.tsx
var kbdVariants = cva("pointer-events-none inline-flex items-center justify-center select-none font-sans font-medium", {
	variants: {
		variant: {
			default: "bg-muted text-muted-foreground border border-border rounded-sm shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.1),0_1px_0_0_rgba(255,255,255,0.15)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.25),0_1px_0_0_rgba(255,255,255,0.04)]",
			ghost: "bg-transparent text-muted-foreground",
			outline: "bg-transparent border border-border text-muted-foreground rounded-sm shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.06)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.2)]",
			solid: "bg-card/60 border border-border text-muted-foreground rounded shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.1),0_1px_0_0_rgba(255,255,255,0.15)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.25),0_1px_0_0_rgba(255,255,255,0.04)]",
			tooltip: "bg-background/20 text-background dark:bg-background/10 rounded-sm",
			footer: "bg-background border border-border text-quaternary-foreground rounded-md shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.06),0_1px_0_0_rgba(255,255,255,0.1)] dark:shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.2),0_1px_0_0_rgba(255,255,255,0.03)]"
		},
		size: {
			xs: "h-4 min-w-4 px-0.5 text-[10px]",
			sm: "h-5 min-w-5 px-1 text-xs",
			md: "h-6 min-w-6 px-1.5 text-sm",
			lg: "h-7 min-w-7 px-2 text-sm"
		}
	},
	defaultVariants: {
		variant: "default",
		size: "sm"
	}
});
var kbdGroupVariants = cva("inline-flex items-center", {
	variants: { gap: {
		none: "gap-0",
		xs: "gap-0.5",
		sm: "gap-1",
		md: "gap-1.5",
		lg: "gap-2"
	} },
	defaultVariants: { gap: "sm" }
});
/**
* Keyboard key indicator component for displaying keyboard shortcuts.
*
* @example
* // Basic usage
* <Kbd>⌘K</Kbd>
*
* @example
* // With variant and size
* <Kbd variant="solid" size="md">⌘</Kbd>
*
* @example
* // With icon
* <Kbd icon={<ArrowUp />} />
*/
var Kbd = React.forwardRef(({ className, variant, size, icon, iconAfter, children, ...props }, ref) => {
	return /* @__PURE__ */ jsxs("kbd", {
		ref,
		"data-slot": "kbd",
		className: cn(kbdVariants({
			variant,
			size
		}), className),
		...props,
		children: [
			icon && /* @__PURE__ */ jsx("span", {
				"aria-hidden": "true",
				className: "shrink-0 [&_svg:not([class*='size-'])]:size-3",
				children: icon
			}),
			children,
			iconAfter && /* @__PURE__ */ jsx("span", {
				"aria-hidden": "true",
				className: "shrink-0 [&_svg:not([class*='size-'])]:size-3",
				children: iconAfter
			})
		]
	});
});
Kbd.displayName = "Kbd";
/**
* Group multiple Kbd components together with consistent spacing.
*
* @example
* <KbdGroup>
*   <Kbd>⌘</Kbd>
*   <Kbd>K</Kbd>
* </KbdGroup>
*/
var KbdGroup = React.forwardRef(({ className, gap, ...props }, ref) => {
	return /* @__PURE__ */ jsx("span", {
		ref,
		"data-slot": "kbd-group",
		className: cn(kbdGroupVariants({ gap }), className),
		...props
	});
});
KbdGroup.displayName = "KbdGroup";
/**
* Convenience component for displaying keyboard shortcuts with multiple keys.
*
* @example
* // Simple shortcut
* <Shortcut keys={['⌘', 'K']} />
*
* @example
* // With separator
* <Shortcut keys={['⌘', 'Shift', 'P']} separator="+" />
*/
var Shortcut = React.forwardRef(({ keys, separator, className, variant, size, ...props }, ref) => {
	if (separator) return /* @__PURE__ */ jsx(KbdGroup, {
		ref,
		gap: "xs",
		className,
		children: keys.map((key, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(Kbd, {
			variant,
			size,
			...props,
			children: key
		}), index < keys.length - 1 && /* @__PURE__ */ jsx("span", {
			className: "text-muted-foreground text-xs",
			children: separator
		})] }, index))
	});
	return /* @__PURE__ */ jsx(KbdGroup, {
		ref,
		gap: "xs",
		className,
		children: keys.map((key, index) => /* @__PURE__ */ jsx(Kbd, {
			variant,
			size,
			...props,
			children: key
		}, index))
	});
});
Shortcut.displayName = "Shortcut";
/**
* Common keyboard key symbols for macOS
*/
var MAC_KEYS = {
	cmd: "⌘",
	command: "⌘",
	ctrl: "⌃",
	control: "⌃",
	alt: "⌥",
	option: "⌥",
	shift: "⇧",
	enter: "↵",
	return: "↵",
	backspace: "⌫",
	delete: "⌦",
	tab: "⇥",
	esc: "esc",
	escape: "esc",
	up: "↑",
	down: "↓",
	left: "←",
	right: "→",
	space: "␣"
};
/**
* Common keyboard key symbols for Windows/Linux
*/
var WIN_KEYS = {
	cmd: "Ctrl",
	command: "Ctrl",
	ctrl: "Ctrl",
	control: "Ctrl",
	alt: "Alt",
	option: "Alt",
	shift: "Shift",
	enter: "Enter",
	return: "Enter",
	backspace: "Backspace",
	delete: "Delete",
	tab: "Tab",
	esc: "Esc",
	escape: "Esc",
	up: "↑",
	down: "↓",
	left: "←",
	right: "→",
	space: "Space"
};
//#endregion
export { Kbd, KbdGroup, MAC_KEYS, Shortcut, WIN_KEYS, kbdGroupVariants, kbdVariants };

//# sourceMappingURL=index83.js.map