starkon
Version:
Complete Next.js boilerplate with authentication, i18n & CLI - Create production-ready apps instantly
1,068 lines (1,061 loc) • 698 kB
JavaScript
'use strict';
var React13 = require('react');
var tailwindMerge = require('tailwind-merge');
var clsx = require('clsx');
var jsxRuntime = require('react/jsx-runtime');
var LabelPrimitive = require('@radix-ui/react-label');
var classVarianceAuthority = require('class-variance-authority');
var SwitchPrimitives = require('@radix-ui/react-switch');
var lucideReact = require('lucide-react');
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
var SelectPrimitive = require('@radix-ui/react-select');
var DialogPrimitive = require('@radix-ui/react-dialog');
var TabsPrimitive = require('@radix-ui/react-tabs');
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
var AvatarPrimitive = require('@radix-ui/react-avatar');
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
var TooltipPrimitive = require('@radix-ui/react-tooltip');
var PopoverPrimitive = require('@radix-ui/react-popover');
var framerMotion = require('framer-motion');
var SeparatorPrimitive = require('@radix-ui/react-separator');
var SliderPrimitive = require('@radix-ui/react-slider');
var reactDom = require('react-dom');
var zustand = require('zustand');
var middleware = require('zustand/middleware');
var reactErrorBoundary = require('react-error-boundary');
var reactTable = require('@tanstack/react-table');
var axios = require('axios');
var navigation = require('next/navigation');
var reactI18next = require('react-i18next');
var i18n = require('i18next');
var LanguageDetector = require('i18next-browser-languagedetector');
var CryptoJS = require('crypto-js');
var zod = require('zod');
var zod$1 = require('@hookform/resolvers/zod');
var reactHookForm = require('react-hook-form');
var ProgressPrimitive = require('@radix-ui/react-progress');
var dateFns = require('date-fns');
var tr = require('date-fns/locale/tr');
var enUS = require('date-fns/locale/en-US');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var React13__namespace = /*#__PURE__*/_interopNamespace(React13);
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
var axios__default = /*#__PURE__*/_interopDefault(axios);
var i18n__default = /*#__PURE__*/_interopDefault(i18n);
var LanguageDetector__default = /*#__PURE__*/_interopDefault(LanguageDetector);
var CryptoJS__default = /*#__PURE__*/_interopDefault(CryptoJS);
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
/**
* Starkon - Custom Radix UI Components
* @license MIT
*/
function cn(...inputs) {
return tailwindMerge.twMerge(clsx.clsx(inputs));
}
function debounce(fn, ms = 300) {
let timeoutId;
return function(...args) {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => fn.apply(this, args), ms);
};
}
function isDarkMode() {
if (typeof window === "undefined") return false;
return localStorage.getItem("theme") === "dark" || !localStorage.getItem("theme") && window.matchMedia("(prefers-color-scheme: dark)").matches;
}
function get(obj, path, defaultValue = void 0) {
const travel = (regexp) => String.prototype.split.call(path, regexp).filter(Boolean).reduce((res, key) => res !== null && res !== void 0 ? res[key] : res, obj);
const result = travel(/[,[\]]+?/) || travel(/[,.[\]]+?/);
return result === void 0 || result === obj ? defaultValue : result;
}
function sanitizeHtml(html) {
return html.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
}
function formatDate(date, locale = "en-US") {
const d = typeof date === "string" ? new Date(date) : date;
return d.toLocaleDateString(locale, {
year: "numeric",
month: "long",
day: "numeric"
});
}
var storage = {
get: (key, defaultValue) => {
if (typeof window === "undefined") return defaultValue;
try {
const item = window.localStorage.getItem(key);
return item ? JSON.parse(item) : defaultValue;
} catch (error) {
console.error("Error getting item from localStorage", error);
return defaultValue;
}
},
set: (key, value) => {
if (typeof window === "undefined") return;
try {
window.localStorage.setItem(key, JSON.stringify(value));
} catch (error) {
console.error("Error setting item in localStorage", error);
}
},
remove: (key) => {
if (typeof window === "undefined") return;
try {
window.localStorage.removeItem(key);
} catch (error) {
console.error("Error removing item from localStorage", error);
}
}
};
var Input = React13__namespace.forwardRef(({ className, type, error, ...props }, ref) => {
return /* @__PURE__ */ jsxRuntime.jsx(
"input",
{
type,
className: cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
error && "border-destructive",
className
),
ref,
...props
}
);
});
Input.displayName = "Input";
var labelVariants = classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
var Label = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(LabelPrimitive__namespace.Root, { ref, className: cn(labelVariants(), className), ...props }));
Label.displayName = LabelPrimitive__namespace.Root.displayName;
var Switch = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
SwitchPrimitives__namespace.Root,
{
className: cn(
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-500 data-[state=unchecked]:bg-neutral-200 dark:data-[state=checked]:bg-primary-600 dark:data-[state=unchecked]:bg-neutral-800",
className
),
...props,
ref,
children: /* @__PURE__ */ jsxRuntime.jsx(
SwitchPrimitives__namespace.Thumb,
{
className: cn(
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950"
)
}
)
}
));
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
var Textarea = React13__namespace.forwardRef(
({ className, ...props }, ref) => {
return /* @__PURE__ */ jsxRuntime.jsx(
"textarea",
{
className: cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
className
),
ref,
...props
}
);
}
);
Textarea.displayName = "Textarea";
var Checkbox = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
CheckboxPrimitive__namespace.Root,
{
ref,
className: cn(
"peer h-4 w-4 shrink-0 rounded-sm border shadow transition-all",
"focus-visible:outline-none",
"disabled:cursor-not-allowed disabled:opacity-50",
// Light mode styles
"border-neutral-300 bg-white text-white",
"hover:border-neutral-400 hover:bg-neutral-50",
"data-[state=checked]:bg-primary-500 data-[state=checked]:border-primary-500",
"data-[state=checked]:text-white",
// Dark mode styles
"dark:border-neutral-600 dark:bg-neutral-900 dark:text-white",
"dark:hover:border-neutral-500 dark:hover:bg-neutral-800",
"dark:focus-visible:outline-none",
"dark:data-[state=checked]:bg-primary-600 dark:data-[state=checked]:border-primary-600",
"dark:data-[state=checked]:text-white",
className
),
...props,
children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, { className: cn("flex items-center justify-center text-current"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5" }) })
}
));
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
var buttonVariants = classVarianceAuthority.cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline"
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
lg: "h-11 rounded-md px-8",
icon: "h-10 w-10"
}
},
defaultVariants: {
variant: "default",
size: "default"
}
}
);
var Button = React13__namespace.forwardRef(({ className, variant, size, ...props }, ref) => {
return /* @__PURE__ */ jsxRuntime.jsx("button", { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
});
Button.displayName = "Button";
var Select = SelectPrimitive__namespace.Root;
var SelectGroup = SelectPrimitive__namespace.Group;
var SelectValue = SelectPrimitive__namespace.Value;
var SelectTrigger = React13__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
SelectPrimitive__namespace.Trigger,
{
ref,
className: cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className
),
...props,
children: [
children,
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
]
}
));
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
var SelectScrollUpButton = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
SelectPrimitive__namespace.ScrollUpButton,
{
ref,
className: cn("flex cursor-default items-center justify-center py-1", className),
...props,
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
}
));
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
var SelectScrollDownButton = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
SelectPrimitive__namespace.ScrollDownButton,
{
ref,
className: cn("flex cursor-default items-center justify-center py-1", className),
...props,
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
}
));
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
var SelectContent = React13__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
SelectPrimitive__namespace.Content,
{
ref,
className: cn(
"relative z-[10000] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className
),
position,
...props,
children: [
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
/* @__PURE__ */ jsxRuntime.jsx(
SelectPrimitive__namespace.Viewport,
{
className: cn(
"p-1",
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
),
children
}
),
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
]
}
) }));
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
var SelectLabel = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Label, { ref, className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className), ...props }));
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
var SelectItem = React13__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
SelectPrimitive__namespace.Item,
{
ref,
className: cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
),
...props,
children: [
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
]
}
));
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
var SelectSeparator = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
var Dialog = DialogPrimitive__namespace.Root;
var DialogTrigger = DialogPrimitive__namespace.Trigger;
var DialogPortal = DialogPrimitive__namespace.Portal;
var DialogOverlay = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
DialogPrimitive__namespace.Overlay,
{
ref,
className: cn(
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className
),
...props
}
));
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
var DialogContent = React13__namespace.forwardRef(
({ className, children, showCloseButton = true, hideCloseButton = false, ...props }, ref) => {
const shouldShowCloseButton = hideCloseButton ? false : showCloseButton;
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
/* @__PURE__ */ jsxRuntime.jsxs(
DialogPrimitive__namespace.Content,
{
ref,
className: cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
className
),
...props,
children: [
children,
shouldShowCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Kapat" })
] })
]
}
)
] });
}
);
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
DialogHeader.displayName = "DialogHeader";
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
DialogFooter.displayName = "DialogFooter";
var DialogTitle = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
DialogPrimitive__namespace.Title,
{
ref,
className: cn("text-lg font-semibold leading-none tracking-tight", className),
...props
}
));
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
var DialogDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
var Tabs = TabsPrimitive__namespace.Root;
var TabsList = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
TabsPrimitive__namespace.List,
{
ref,
className: cn(
"inline-flex h-9 items-center justify-center rounded-lg bg-neutral-100 p-1 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400",
className
),
...props
}
));
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
var TabsTrigger = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
TabsPrimitive__namespace.Trigger,
{
ref,
className: cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50",
className
),
...props
}
));
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
var TabsContent = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
TabsPrimitive__namespace.Content,
{
ref,
className: cn(
"mt-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50",
className
),
...props
}
)
);
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
var Card = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className), ...props }));
Card.displayName = "Card";
var CardHeader = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
);
CardHeader.displayName = "CardHeader";
var CardTitle = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })
);
CardTitle.displayName = "CardTitle";
var CardDescription = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
);
CardDescription.displayName = "CardDescription";
var CardContent = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
);
CardContent.displayName = "CardContent";
var CardFooter = React13__namespace.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
);
CardFooter.displayName = "CardFooter";
var AlertDialog = AlertDialogPrimitive__namespace.Root;
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
var AlertDialogOverlay = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
AlertDialogPrimitive__namespace.Overlay,
{
className: cn(
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className
),
...props,
ref
}
));
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
var AlertDialogContent = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
/* @__PURE__ */ jsxRuntime.jsx(
AlertDialogPrimitive__namespace.Content,
{
ref,
className: cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",
className
),
...props
}
)
] }));
AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
AlertDialogHeader.displayName = "AlertDialogHeader";
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
AlertDialogFooter.displayName = "AlertDialogFooter";
var AlertDialogTitle = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
var AlertDialogDescription = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
AlertDialogPrimitive__namespace.Description,
{
ref,
className: cn("text-sm text-neutral-500 dark:text-neutral-400", className),
...props
}
));
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
var AlertDialogAction = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Action, { ref, className: cn(buttonVariants(), className), ...props }));
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
var AlertDialogCancel = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
AlertDialogPrimitive__namespace.Cancel,
{
ref,
className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
...props
}
));
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
var Avatar = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
AvatarPrimitive__namespace.Root,
{
ref,
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
...props
}
));
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
var AvatarImage = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref, className: cn("aspect-square h-full w-full", className), ...props }));
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
var AvatarFallback = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
AvatarPrimitive__namespace.Fallback,
{
ref,
className: cn(
"flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800",
className
),
...props
}
));
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
var DropdownMenuSubTrigger = React13__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
DropdownMenuPrimitive__namespace.SubTrigger,
{
ref,
className: cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className
),
...props,
children: [
children,
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
]
}
));
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
var DropdownMenuSubContent = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
DropdownMenuPrimitive__namespace.SubContent,
{
ref,
className: cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
),
...props
}
));
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
var DropdownMenuContent = React13__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
DropdownMenuPrimitive__namespace.Content,
{
ref,
sideOffset,
className: cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
),
...props
}
) }));
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
var DropdownMenuItem = React13__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
DropdownMenuPrimitive__namespace.Item,
{
ref,
className: cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className
),
...props
}
));
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
var DropdownMenuCheckboxItem = React13__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
DropdownMenuPrimitive__namespace.CheckboxItem,
{
ref,
className: cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
),
checked,
...props,
children: [
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
children
]
}
));
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
var DropdownMenuRadioItem = React13__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
DropdownMenuPrimitive__namespace.RadioItem,
{
ref,
className: cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
),
...props,
children: [
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
children
]
}
));
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
var DropdownMenuLabel = React13__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
DropdownMenuPrimitive__namespace.Label,
{
ref,
className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
...props
}
));
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
var DropdownMenuSeparator = React13__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props }));
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
var DropdownMenuShortcut = ({ className, ...props }) => {
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
};
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
var spinnerVariants = classVarianceAuthority.cva("", {
variants: {
size: {
xs: "h-3 w-3",
sm: "h-4 w-4",
md: "h-6 w-6",
lg: "h-8 w-8",
xl: "h-12 w-12",
"2xl": "h-16 w-16"
},
variant: {
default: "text-primary-500 dark:text-primary-400",
secondary: "text-neutral-500 dark:text-neutral-400",
white: "text-white",
accent: "text-accent-500 dark:text-accent-400"
}
},
defaultVariants: {
size: "md",
variant: "default"
}
});
var LoadingSpinner = React13__namespace.forwardRef(
({ className, size, variant, text, centered = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
"div",
{
ref,
className: cn(
"inline-flex items-center gap-3",
{
"w-full justify-center": centered
},
className
),
...props,
children: [
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", spinnerVariants({ size, variant })), children: [
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full bg-gradient-to-r from-current via-transparent to-current opacity-20 animate-spin" }),
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: "h-full w-full rounded-full border-2 border-transparent bg-gradient-to-r from-current to-transparent animate-spin",
style: {
mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
maskComposite: "xor"
}
}
) }),
/* @__PURE__ */ jsxRuntime.jsxs(
"svg",
{
className: "relative animate-spin",
style: { animationDuration: "1.5s", animationTimingFunction: "cubic-bezier(0.4, 0, 0.6, 1)" },
viewBox: "0 0 24 24",
fill: "none",
children: [
/* @__PURE__ */ jsxRuntime.jsx(
"circle",
{
cx: "12",
cy: "12",
r: "10",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeDasharray: "31.416",
strokeDashoffset: "31.416",
className: "opacity-25"
}
),
/* @__PURE__ */ jsxRuntime.jsx(
"circle",
{
cx: "12",
cy: "12",
r: "10",
stroke: "currentColor",
strokeWidth: "2",
strokeLinecap: "round",
strokeDasharray: "31.416",
strokeDashoffset: "23.562",
className: "opacity-75",
style: {
filter: "drop-shadow(0 0 6px currentColor)"
}
}
)
]
}
)
] }),
text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-neutral-600 dark:text-neutral-400 animate-pulse", children: text })
]
}
)
);
LoadingSpinner.displayName = "LoadingSpinner";
var LoadingDots = React13__namespace.forwardRef(
({ className, size = "md", variant = "default", text, ...props }, ref) => {
const dotSizeMap = {
xs: "h-1 w-1",
sm: "h-1.5 w-1.5",
md: "h-2 w-2",
lg: "h-2.5 w-2.5",
xl: "h-3 w-3",
"2xl": "h-4 w-4"
};
const colorMap = {
default: "bg-gradient-to-r from-primary-400 to-primary-600 dark:from-primary-300 dark:to-primary-500",
secondary: "bg-gradient-to-r from-neutral-400 to-neutral-600 dark:from-neutral-300 dark:to-neutral-500",
white: "bg-white shadow-lg",
accent: "bg-gradient-to-r from-accent-400 to-accent-600 dark:from-accent-300 dark:to-accent-500"
};
const safeSize = size || "md";
const safeVariant = variant || "default";
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("inline-flex items-center gap-3", className), ...props, children: [
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex space-x-1.5", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: cn("rounded-full transform-gpu", dotSizeMap[safeSize], colorMap[safeVariant]),
style: {
animation: `modernBounce 1.4s ease-in-out ${index * 0.2}s infinite`,
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.1))"
}
},
index
)) }),
text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: text })
] });
}
);
LoadingDots.displayName = "LoadingDots";
var LoadingPulse = React13__namespace.forwardRef(
({ className, size = "md", variant = "default", text, ...props }, ref) => {
const pulseSizeMap = {
xs: "h-6 w-6",
sm: "h-8 w-8",
md: "h-12 w-12",
lg: "h-16 w-16",
xl: "h-20 w-20",
"2xl": "h-24 w-24"
};
const pulseColorMap = {
default: "bg-gradient-to-br from-primary-200 via-primary-300 to-primary-400 dark:from-primary-700 dark:via-primary-800 dark:to-primary-900",
secondary: "bg-gradient-to-br from-neutral-200 via-neutral-300 to-neutral-400 dark:from-neutral-700 dark:via-neutral-800 dark:to-neutral-900",
white: "bg-gradient-to-br from-white via-gray-50 to-gray-100",
accent: "bg-gradient-to-br from-accent-200 via-accent-300 to-accent-400 dark:from-accent-700 dark:via-accent-800 dark:to-accent-900"
};
const safeSize = size || "md";
const safeVariant = variant || "default";
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("inline-flex items-center gap-3", className), ...props, children: [
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
/* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: cn(
"absolute inset-0 rounded-full opacity-30 blur-sm",
pulseSizeMap[safeSize],
pulseColorMap[safeVariant]
),
style: {
animation: "modernPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
}
}
),
/* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: cn("relative rounded-full shadow-lg", pulseSizeMap[safeSize], pulseColorMap[safeVariant]),
style: {
animation: "modernPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
animationDelay: "0.3s",
boxShadow: "inset 2px 2px 4px rgba(255,255,255,0.3), inset -2px -2px 4px rgba(0,0,0,0.1)"
}
}
),
/* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: cn("absolute top-1/4 left-1/4 rounded-full bg-white opacity-40", {
"h-1.5 w-1.5": safeSize === "xs",
"h-2 w-2": safeSize === "sm",
"h-3 w-3": safeSize === "md",
"h-4 w-4": safeSize === "lg",
"h-5 w-5": safeSize === "xl",
"h-6 w-6": safeSize === "2xl"
}),
style: {
animation: "modernPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
animationDelay: "0.1s"
}
}
)
] }),
text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-neutral-600 dark:text-neutral-400", children: text })
] });
}
);
LoadingPulse.displayName = "LoadingPulse";
var variantStyles = {
default: {
backgroundColor: "hsl(var(--primary))",
color: "hsl(var(--primary-foreground))",
borderWidth: "0"
},
secondary: {
backgroundColor: "hsl(var(--secondary))",
color: "hsl(var(--secondary-foreground))",
borderWidth: "0"
},
destructive: {
backgroundColor: "hsl(var(--destructive))",
color: "hsl(var(--destructive-foreground))",
borderWidth: "0"
},
warning: {
backgroundColor: "rgb(251 146 60)",
// orange-400
color: "rgb(255 255 255)",
// white
borderWidth: "0"
},
outline: {
backgroundColor: "transparent",
color: "hsl(var(--foreground))",
borderColor: "hsl(var(--border))",
borderWidth: "1px",
borderStyle: "solid"
}
};
var sizeStyles = {
default: "px-2.5 py-0.5 text-xs",
sm: "px-2 py-0.5 text-xs",
lg: "px-3 py-1 text-sm"
};
function Badge({
className,
variant = "default",
size = "default",
borderColor,
backgroundColor,
textColor,
style,
...props
}) {
const combinedStyle = {
// Base variant styles
...variantStyles[variant],
// Custom overrides
...backgroundColor && { backgroundColor },
...textColor && { color: textColor },
...borderColor && {
borderColor,
borderWidth: "1px",
borderStyle: "solid"
},
// Merge any additional styles
...style
};
return /* @__PURE__ */ jsxRuntime.jsx(
"span",
{
className: cn(
// Base classes without any border, background, or color classes
"inline-flex items-center font-semibold transition-colors focus:outline-none rounded-full",
// Size classes
sizeStyles[size],
// Hover effects without color specifications
"hover:opacity-80",
className
),
style: combinedStyle,
...props
}
);
}
var skeletonVariants = classVarianceAuthority.cva("animate-pulse bg-neutral-200 dark:bg-neutral-800", {
variants: {
variant: {
default: "rounded-md",
circular: "rounded-full",
rectangular: "rounded-none",
text: "rounded-sm h-4"
},
animation: {
pulse: "animate-pulse",
shimmer: "animate-shimmer bg-gradient-to-r from-neutral-200 via-neutral-300 to-neutral-200 dark:from-neutral-800 dark:via-neutral-700 dark:to-neutral-800",
wave: "animate-wave",
none: ""
}
},
defaultVariants: {
variant: "default",
animation: "pulse"
}
});
var Skeleton = React13__namespace.default.forwardRef(
({ className, variant, animation, width, height, lines, style, ...props }, ref) => {
const baseStyle = {
width: typeof width === "number" ? `${width}px` : width,
height: typeof height === "number" ? `${height}px` : height,
...style
};
if (variant === "text" && lines && lines > 1) {
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("space-y-2", className), ...props, children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
"div",
{
className: cn(skeletonVariants({ variant, animation })),
style: {
...baseStyle,
width: index === lines - 1 && lines > 1 ? "75%" : baseStyle.width
}
},
index
)) });
}
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(skeletonVariants({ variant, animation }), className), style: baseStyle, ...props });
}
);
Skeleton.displayName = "Skeleton";
var SkeletonText = React13__namespace.default.forwardRef(
({ lines = 1, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ref, variant: "text", lines, ...props })
);
SkeletonText.displayName = "SkeletonText";
var SkeletonAvatar = React13__namespace.default.forwardRef(({ size = 40, className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ref, variant: "circular", width: size, height: size, className, ...props }));
SkeletonAvatar.displayName = "SkeletonAvatar";
var SkeletonButton = React13__namespace.default.forwardRef(
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ref, variant: "default", width: 80, height: 36, className, ...props })
);
SkeletonButton.displayName = "SkeletonButton";
var SkeletonCard = React13__namespace.default.forwardRef(
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("p-6 space-y-4", className), ...props, children: [
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "text", width: "60%", height: 20 }),
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "text", lines: 2, height: 16 })
] }),
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rectangular", width: "100%", height: 200 }),
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-4", children: [
/* @__PURE__ */ jsxRuntime.jsx(SkeletonAvatar, { size: 32 }),
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1 flex-1", children: [
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "text", width: "40%", height: 14 }),
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "text", width: "60%", height: 12 })
] })
] }),
children
] })
);
SkeletonCard.displayName = "SkeletonCard";
var TooltipProvider = TooltipPrimitive__namespace.Provider;
var Tooltip = TooltipPrimitive__namespace.Root;
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
var TooltipContent = React13__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
TooltipPrimitive__namespace.Content,
{
ref,
sideOffset,
className: cn(
"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
className
),
...props
}
));
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
function TooltipComponent({
children,
content,
delayDuration = 300,
side = "top",
align = "center",
disabled = false,
className,
contentClassName,
...props
}) {
if (disabled) {
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
}
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { delayDuration, ...props, children: [
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, className, children }),
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side, align, className: contentClassName, children: content })
] });
}
var Popover = PopoverPrimitive__namespace.Root;
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
var PopoverContent = React13__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
PopoverPrimitive__namespace.Content,
{
ref,
align,
sideOffset,
className: cn(
"z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
className
),
...props
}
) }));
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
var AccordionContext = React13.createContext(null);
var useAccordionContext = () => {
const context = React13.useContext(AccordionContext);
if (!context) {
throw new Error("Accordion bile\u015Fenleri bir AccordionRoot i\xE7inde kullan\u0131lmal\u0131d\u0131r");
}
return context;
};
function AccordionRoot({
children,
defaultValue = [],
value,
onValueChange,
allowMultiple = false,
className,
type = "single",
collapsible = true
}) {
const isMultiple = React13.useMemo(() => type === "multiple" || allowMultiple, [type, allowMultiple]);
const [internalExpanded, setInternalExpanded] = React13.useState(defaultValue || []);