@taicode/common-web 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/output/components/alert-dialog.js +10 -10
  2. package/output/components/alert.js +5 -5
  3. package/output/components/avatar.js +7 -7
  4. package/output/components/badge.js +2 -2
  5. package/output/components/button.js +2 -2
  6. package/output/components/card.js +7 -7
  7. package/output/components/checkbox.js +2 -2
  8. package/output/components/command.js +10 -10
  9. package/output/components/dialog.js +7 -7
  10. package/output/components/dropdown-menu.js +10 -10
  11. package/output/components/field.js +11 -11
  12. package/output/components/input-group.js +7 -7
  13. package/output/components/input.js +2 -2
  14. package/output/components/item.js +11 -11
  15. package/output/components/json-view/index.js +2 -2
  16. package/output/components/kbd.js +3 -3
  17. package/output/components/label.js +2 -2
  18. package/output/components/native-select.js +3 -3
  19. package/output/components/popover.js +5 -5
  20. package/output/components/progress.js +2 -2
  21. package/output/components/radio-group.js +3 -3
  22. package/output/components/scroll-area.js +3 -3
  23. package/output/components/select.js +9 -9
  24. package/output/components/separator.js +2 -2
  25. package/output/components/sheet.js +7 -7
  26. package/output/components/skeleton.js +2 -2
  27. package/output/components/spinner.js +2 -2
  28. package/output/components/switch.js +2 -2
  29. package/output/components/table.js +9 -9
  30. package/output/components/tabs.js +5 -5
  31. package/output/components/textarea.js +2 -2
  32. package/output/components/tooltip.js +2 -2
  33. package/output/features/confirm-dialog/index.js +2 -2
  34. package/output/layout/app/index.js +7 -7
  35. package/output/layout/dashboard/index.js +2 -2
  36. package/output/utils/merge-class-names/index.d.ts +3 -0
  37. package/output/utils/merge-class-names/index.d.ts.map +1 -0
  38. package/output/utils/{cn → merge-class-names}/index.js +1 -1
  39. package/output/utils/merge-class-names/index.test.d.ts.map +1 -0
  40. package/output/utils/merge-class-names/index.test.js +7 -0
  41. package/package.json +2 -42
  42. package/output/utils/cn/index.d.ts +0 -3
  43. package/output/utils/cn/index.d.ts.map +0 -1
  44. package/output/utils/cn/index.test.d.ts.map +0 -1
  45. package/output/utils/cn/index.test.js +0 -7
  46. /package/output/utils/{cn → merge-class-names}/index.test.d.ts +0 -0
@@ -13,15 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { cva } from "class-variance-authority";
15
15
  import { Slot } from "radix-ui";
16
- import { cn } from "../utils/cn/index.js";
16
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
17
  import { Separator } from "./separator.js";
18
18
  function ItemGroup(params) {
19
19
  const { className } = params, props = __rest(params, ["className"]);
20
- return (_jsx("div", Object.assign({ role: "list", "data-slot": "item-group", className: cn("gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col", className) }, props)));
20
+ return (_jsx("div", Object.assign({ role: "list", "data-slot": "item-group", className: mergeClassNames("gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col", className) }, props)));
21
21
  }
22
22
  function ItemSeparator(params) {
23
23
  const { className } = params, props = __rest(params, ["className"]);
24
- return (_jsx(Separator, Object.assign({ "data-slot": "item-separator", orientation: "horizontal", className: cn("my-2", className) }, props)));
24
+ return (_jsx(Separator, Object.assign({ "data-slot": "item-separator", orientation: "horizontal", className: mergeClassNames("my-2", className) }, props)));
25
25
  }
26
26
  const itemVariants = cva("[a]:hover:bg-muted rounded-md border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors", {
27
27
  variants: {
@@ -44,7 +44,7 @@ const itemVariants = cva("[a]:hover:bg-muted rounded-md border text-sm w-full gr
44
44
  function Item(params) {
45
45
  const { className, variant = "default", size = "default", asChild = false } = params, props = __rest(params, ["className", "variant", "size", "asChild"]);
46
46
  const Comp = asChild ? Slot.Root : "div";
47
- return (_jsx(Comp, Object.assign({ "data-slot": "item", "data-variant": variant, "data-size": size, className: cn(itemVariants({ variant, size, className })) }, props)));
47
+ return (_jsx(Comp, Object.assign({ "data-slot": "item", "data-variant": variant, "data-size": size, className: mergeClassNames(itemVariants({ variant, size, className })) }, props)));
48
48
  }
49
49
  const itemMediaVariants = cva("gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none", {
50
50
  variants: {
@@ -60,30 +60,30 @@ const itemMediaVariants = cva("gap-2 group-has-[[data-slot=item-description]]/it
60
60
  });
61
61
  function ItemMedia(params) {
62
62
  const { className, variant = "default" } = params, props = __rest(params, ["className", "variant"]);
63
- return (_jsx("div", Object.assign({ "data-slot": "item-media", "data-variant": variant, className: cn(itemMediaVariants({ variant, className })) }, props)));
63
+ return (_jsx("div", Object.assign({ "data-slot": "item-media", "data-variant": variant, className: mergeClassNames(itemMediaVariants({ variant, className })) }, props)));
64
64
  }
65
65
  function ItemContent(params) {
66
66
  const { className } = params, props = __rest(params, ["className"]);
67
- return (_jsx("div", Object.assign({ "data-slot": "item-content", className: cn("gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none", className) }, props)));
67
+ return (_jsx("div", Object.assign({ "data-slot": "item-content", className: mergeClassNames("gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none", className) }, props)));
68
68
  }
69
69
  function ItemTitle(params) {
70
70
  const { className } = params, props = __rest(params, ["className"]);
71
- return (_jsx("div", Object.assign({ "data-slot": "item-title", className: cn("gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center", className) }, props)));
71
+ return (_jsx("div", Object.assign({ "data-slot": "item-title", className: mergeClassNames("gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center", className) }, props)));
72
72
  }
73
73
  function ItemDescription(params) {
74
74
  const { className } = params, props = __rest(params, ["className"]);
75
- return (_jsx("p", Object.assign({ "data-slot": "item-description", className: cn("text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4", className) }, props)));
75
+ return (_jsx("p", Object.assign({ "data-slot": "item-description", className: mergeClassNames("text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4", className) }, props)));
76
76
  }
77
77
  function ItemActions(params) {
78
78
  const { className } = params, props = __rest(params, ["className"]);
79
- return (_jsx("div", Object.assign({ "data-slot": "item-actions", className: cn("gap-2 flex items-center", className) }, props)));
79
+ return (_jsx("div", Object.assign({ "data-slot": "item-actions", className: mergeClassNames("gap-2 flex items-center", className) }, props)));
80
80
  }
81
81
  function ItemHeader(params) {
82
82
  const { className } = params, props = __rest(params, ["className"]);
83
- return (_jsx("div", Object.assign({ "data-slot": "item-header", className: cn("gap-2 flex basis-full items-center justify-between", className) }, props)));
83
+ return (_jsx("div", Object.assign({ "data-slot": "item-header", className: mergeClassNames("gap-2 flex basis-full items-center justify-between", className) }, props)));
84
84
  }
85
85
  function ItemFooter(params) {
86
86
  const { className } = params, props = __rest(params, ["className"]);
87
- return (_jsx("div", Object.assign({ "data-slot": "item-footer", className: cn("gap-2 flex basis-full items-center justify-between", className) }, props)));
87
+ return (_jsx("div", Object.assign({ "data-slot": "item-footer", className: mergeClassNames("gap-2 flex basis-full items-center justify-between", className) }, props)));
88
88
  }
89
89
  export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
@@ -3,7 +3,7 @@ import 'jsoneditor/dist/jsoneditor.css';
3
3
  import JSONEditor from 'jsoneditor';
4
4
  import { observer } from 'mobx-react-lite';
5
5
  import { useEffect, useRef } from 'react';
6
- import { cn } from '../../utils/cn/index.js';
6
+ import { mergeClassNames } from '../../utils/merge-class-names/index.js';
7
7
  export const JsonView = observer((props) => {
8
8
  const { value, onChange, readonly = false, className } = props;
9
9
  const containerRef = useRef(null);
@@ -48,5 +48,5 @@ export const JsonView = observer((props) => {
48
48
  }
49
49
  }
50
50
  }, [value]);
51
- return _jsx("div", { ref: containerRef, className: cn('h-96 w-full', className) });
51
+ return _jsx("div", { ref: containerRef, className: mergeClassNames('h-96 w-full', className) });
52
52
  });
@@ -10,13 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { cn } from "../utils/cn/index.js";
13
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
14
14
  function Kbd(params) {
15
15
  const { className } = params, props = __rest(params, ["className"]);
16
- return (_jsx("kbd", Object.assign({ "data-slot": "kbd", className: cn("bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none", className) }, props)));
16
+ return (_jsx("kbd", Object.assign({ "data-slot": "kbd", className: mergeClassNames("bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none", className) }, props)));
17
17
  }
18
18
  function KbdGroup(params) {
19
19
  const { className } = params, props = __rest(params, ["className"]);
20
- return (_jsx("kbd", Object.assign({ "data-slot": "kbd-group", className: cn("gap-1 inline-flex items-center", className) }, props)));
20
+ return (_jsx("kbd", Object.assign({ "data-slot": "kbd-group", className: mergeClassNames("gap-1 inline-flex items-center", className) }, props)));
21
21
  }
22
22
  export { Kbd, KbdGroup };
@@ -12,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { Label as LabelPrimitive } from 'radix-ui';
15
- import { cn } from '../utils/cn/index.js';
15
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
16
16
  function Label(params) {
17
17
  const { className } = params, props = __rest(params, ["className"]);
18
- return (_jsx(LabelPrimitive.Root, Object.assign({ "data-slot": "label", className: cn('gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed', className) }, props)));
18
+ return (_jsx(LabelPrimitive.Root, Object.assign({ "data-slot": "label", className: mergeClassNames('gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed', className) }, props)));
19
19
  }
20
20
  export { Label };
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
- import { cn } from "../utils/cn/index.js";
14
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
15
15
  import { ChevronDownIcon } from "lucide-react";
16
16
  function NativeSelect(params) {
17
17
  const { className, size = "default" } = params, props = __rest(params, ["className", "size"]);
18
- return (_jsxs("div", { className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-slot": "native-select-wrapper", "data-size": size, children: [_jsx("select", Object.assign({ "data-slot": "native-select", "data-size": size, className: "border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent py-1 pr-8 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] select-none focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=sm]:h-8 outline-none disabled:pointer-events-none disabled:cursor-not-allowed" }, props)), _jsx(ChevronDownIcon, { className: "text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
18
+ return (_jsxs("div", { className: mergeClassNames("group/native-select relative w-fit has-[select:disabled]:opacity-50", className), "data-slot": "native-select-wrapper", "data-size": size, children: [_jsx("select", Object.assign({ "data-slot": "native-select", "data-size": size, className: "border-input placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent py-1 pr-8 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] select-none focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=sm]:h-8 outline-none disabled:pointer-events-none disabled:cursor-not-allowed" }, props)), _jsx(ChevronDownIcon, { className: "text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
19
19
  }
20
20
  function NativeSelectOption(params) {
21
21
  const props = __rest(params, []);
@@ -23,6 +23,6 @@ function NativeSelectOption(params) {
23
23
  }
24
24
  function NativeSelectOptGroup(params) {
25
25
  const { className } = params, props = __rest(params, ["className"]);
26
- return (_jsx("optgroup", Object.assign({ "data-slot": "native-select-optgroup", className: cn(className) }, props)));
26
+ return (_jsx("optgroup", Object.assign({ "data-slot": "native-select-optgroup", className: mergeClassNames(className) }, props)));
27
27
  }
28
28
  export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { Popover as PopoverPrimitive } from "radix-ui";
15
- import { cn } from "../utils/cn/index.js";
15
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
16
16
  function Popover(params) {
17
17
  const props = __rest(params, []);
18
18
  return _jsx(PopoverPrimitive.Root, Object.assign({ "data-slot": "popover" }, props));
@@ -23,7 +23,7 @@ function PopoverTrigger(params) {
23
23
  }
24
24
  function PopoverContent(params) {
25
25
  const { className, align = "center", sideOffset = 4 } = params, props = __rest(params, ["className", "align", "sideOffset"]);
26
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden", className) }, props)) }));
26
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: mergeClassNames("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden", className) }, props)) }));
27
27
  }
28
28
  function PopoverAnchor(params) {
29
29
  const props = __rest(params, []);
@@ -31,14 +31,14 @@ function PopoverAnchor(params) {
31
31
  }
32
32
  function PopoverHeader(params) {
33
33
  const { className } = params, props = __rest(params, ["className"]);
34
- return (_jsx("div", Object.assign({ "data-slot": "popover-header", className: cn("flex flex-col gap-1 text-sm", className) }, props)));
34
+ return (_jsx("div", Object.assign({ "data-slot": "popover-header", className: mergeClassNames("flex flex-col gap-1 text-sm", className) }, props)));
35
35
  }
36
36
  function PopoverTitle(params) {
37
37
  const { className } = params, props = __rest(params, ["className"]);
38
- return (_jsx("div", Object.assign({ "data-slot": "popover-title", className: cn("font-medium", className) }, props)));
38
+ return (_jsx("div", Object.assign({ "data-slot": "popover-title", className: mergeClassNames("font-medium", className) }, props)));
39
39
  }
40
40
  function PopoverDescription(params) {
41
41
  const { className } = params, props = __rest(params, ["className"]);
42
- return (_jsx("p", Object.assign({ "data-slot": "popover-description", className: cn("text-muted-foreground", className) }, props)));
42
+ return (_jsx("p", Object.assign({ "data-slot": "popover-description", className: mergeClassNames("text-muted-foreground", className) }, props)));
43
43
  }
44
44
  export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
@@ -13,9 +13,9 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import * as React from "react";
15
15
  import { Progress as ProgressPrimitive } from "radix-ui";
16
- import { cn } from "../utils/cn/index.js";
16
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
17
  function Progress(params) {
18
18
  const { className, value } = params, props = __rest(params, ["className", "value"]);
19
- return (_jsx(ProgressPrimitive.Root, Object.assign({ "data-slot": "progress", className: cn("bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden", className) }, props, { children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary size-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
19
+ return (_jsx(ProgressPrimitive.Root, Object.assign({ "data-slot": "progress", className: mergeClassNames("bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden", className) }, props, { children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary size-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
20
20
  }
21
21
  export { Progress };
@@ -13,13 +13,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
15
15
  import { CircleIcon } from 'lucide-react';
16
- import { cn } from '../utils/cn/index.js';
16
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
17
17
  function RadioGroup(params) {
18
18
  const { className } = params, props = __rest(params, ["className"]);
19
- return _jsx(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: cn('grid gap-3 w-full', className) }, props));
19
+ return _jsx(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: mergeClassNames('grid gap-3 w-full', className) }, props));
20
20
  }
21
21
  function RadioGroupItem(params) {
22
22
  const { className } = params, props = __rest(params, ["className"]);
23
- return (_jsx(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: cn('border-input text-primary dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex size-4 rounded-full shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50', className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "group-aria-invalid/radio-group-item:text-destructive text-primary flex size-4 items-center justify-center", children: _jsx(CircleIcon, { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current" }) }) })));
23
+ return (_jsx(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: mergeClassNames('border-input text-primary dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex size-4 rounded-full shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50', className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "group-aria-invalid/radio-group-item:text-destructive text-primary flex size-4 items-center justify-center", children: _jsx(CircleIcon, { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current" }) }) })));
24
24
  }
25
25
  export { RadioGroup, RadioGroupItem };
@@ -12,13 +12,13 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
15
- import { cn } from "../utils/cn/index.js";
15
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
16
16
  function ScrollArea(params) {
17
17
  const { className, children } = params, props = __rest(params, ["className", "children"]);
18
- return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ "data-slot": "scroll-area", className: cn("relative", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
18
+ return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ "data-slot": "scroll-area", className: mergeClassNames("relative", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
19
19
  }
20
20
  function ScrollBar(params) {
21
21
  const { className, orientation = "vertical" } = params, props = __rest(params, ["className", "orientation"]);
22
- return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, Object.assign({ "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: cn("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className) }, props, { children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "rounded-full bg-border relative flex-1" }) })));
22
+ return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, Object.assign({ "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: mergeClassNames("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className) }, props, { children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "rounded-full bg-border relative flex-1" }) })));
23
23
  }
24
24
  export { ScrollArea, ScrollBar };
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import * as React from "react";
15
15
  import { Select as SelectPrimitive } from "radix-ui";
16
- import { cn } from "../utils/cn/index.js";
16
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
17
  import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
18
18
  function Select(params) {
19
19
  const props = __rest(params, []);
@@ -21,7 +21,7 @@ function Select(params) {
21
21
  }
22
22
  function SelectGroup(params) {
23
23
  const { className } = params, props = __rest(params, ["className"]);
24
- return (_jsx(SelectPrimitive.Group, Object.assign({ "data-slot": "select-group", className: cn("scroll-my-1 p-1", className) }, props)));
24
+ return (_jsx(SelectPrimitive.Group, Object.assign({ "data-slot": "select-group", className: mergeClassNames("scroll-my-1 p-1", className) }, props)));
25
25
  }
26
26
  function SelectValue(params) {
27
27
  const props = __rest(params, []);
@@ -29,30 +29,30 @@ function SelectValue(params) {
29
29
  }
30
30
  function SelectTrigger(params) {
31
31
  const { className, size = "default", children } = params, props = __rest(params, ["className", "size", "children"]);
32
- return (_jsxs(SelectPrimitive.Trigger, Object.assign({ "data-slot": "select-trigger", "data-size": size, className: cn("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] })));
32
+ return (_jsxs(SelectPrimitive.Trigger, Object.assign({ "data-slot": "select-trigger", "data-size": size, className: mergeClassNames("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] })));
33
33
  }
34
34
  function SelectContent(params) {
35
35
  const { className, children, position = "item-aligned", align = "center" } = params, props = __rest(params, ["className", "children", "position", "align"]);
36
- return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, Object.assign({ "data-slot": "select-content", "data-align-trigger": position === "item-aligned", className: cn("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none", 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: position, align: align }, props, { children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: cn("data-[position=popper]:h-[var(--radix-select-trigger-height)] data-[position=popper]:w-full data-[position=popper]:min-w-[var(--radix-select-trigger-width)]", position === "popper" && ""), children: children }), _jsx(SelectScrollDownButton, {})] })) }));
36
+ return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, Object.assign({ "data-slot": "select-content", "data-align-trigger": position === "item-aligned", className: mergeClassNames("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none", 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: position, align: align }, props, { children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: mergeClassNames("data-[position=popper]:h-[var(--radix-select-trigger-height)] data-[position=popper]:w-full data-[position=popper]:min-w-[var(--radix-select-trigger-width)]", position === "popper" && ""), children: children }), _jsx(SelectScrollDownButton, {})] })) }));
37
37
  }
38
38
  function SelectLabel(params) {
39
39
  const { className } = params, props = __rest(params, ["className"]);
40
- return (_jsx(SelectPrimitive.Label, Object.assign({ "data-slot": "select-label", className: cn("text-muted-foreground px-2 py-1.5 text-xs", className) }, props)));
40
+ return (_jsx(SelectPrimitive.Label, Object.assign({ "data-slot": "select-label", className: mergeClassNames("text-muted-foreground px-2 py-1.5 text-xs", className) }, props)));
41
41
  }
42
42
  function SelectItem(params) {
43
43
  const { className, children } = params, props = __rest(params, ["className", "children"]);
44
- return (_jsxs(SelectPrimitive.Item, Object.assign({ "data-slot": "select-item", className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
44
+ return (_jsxs(SelectPrimitive.Item, Object.assign({ "data-slot": "select-item", className: mergeClassNames("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
45
45
  }
46
46
  function SelectSeparator(params) {
47
47
  const { className } = params, props = __rest(params, ["className"]);
48
- return (_jsx(SelectPrimitive.Separator, Object.assign({ "data-slot": "select-separator", className: cn("bg-border -mx-1 my-1 h-px pointer-events-none", className) }, props)));
48
+ return (_jsx(SelectPrimitive.Separator, Object.assign({ "data-slot": "select-separator", className: mergeClassNames("bg-border -mx-1 my-1 h-px pointer-events-none", className) }, props)));
49
49
  }
50
50
  function SelectScrollUpButton(params) {
51
51
  const { className } = params, props = __rest(params, ["className"]);
52
- return (_jsx(SelectPrimitive.ScrollUpButton, Object.assign({ "data-slot": "select-scroll-up-button", className: cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronUpIcon, {}) })));
52
+ return (_jsx(SelectPrimitive.ScrollUpButton, Object.assign({ "data-slot": "select-scroll-up-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronUpIcon, {}) })));
53
53
  }
54
54
  function SelectScrollDownButton(params) {
55
55
  const { className } = params, props = __rest(params, ["className"]);
56
- return (_jsx(SelectPrimitive.ScrollDownButton, Object.assign({ "data-slot": "select-scroll-down-button", className: cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronDownIcon, {}) })));
56
+ return (_jsx(SelectPrimitive.ScrollDownButton, Object.assign({ "data-slot": "select-scroll-down-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronDownIcon, {}) })));
57
57
  }
58
58
  export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -11,9 +11,9 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { forwardRef } from 'react';
14
- import { cn } from '../utils/cn/index.js';
14
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
15
15
  export const Separator = forwardRef(function Separator(_a, ref) {
16
16
  var { className, orientation = 'horizontal' } = _a, props = __rest(_a, ["className", "orientation"]);
17
- return _jsx("div", Object.assign({ ref: ref, role: "separator", "aria-orientation": orientation, className: cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px', className) }, props));
17
+ return _jsx("div", Object.assign({ ref: ref, role: "separator", "aria-orientation": orientation, className: mergeClassNames('shrink-0 bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px', className) }, props));
18
18
  });
19
19
  Separator.displayName = 'Separator';
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { Dialog as SheetPrimitive } from "radix-ui";
15
- import { cn } from "../utils/cn/index.js";
15
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
16
16
  import { Button } from "./button.js";
17
17
  import { XIcon } from "lucide-react";
18
18
  function Sheet(params) {
@@ -33,26 +33,26 @@ function SheetPortal(params) {
33
33
  }
34
34
  function SheetOverlay(params) {
35
35
  const { className } = params, props = __rest(params, ["className"]);
36
- return (_jsx(SheetPrimitive.Overlay, Object.assign({ "data-slot": "sheet-overlay", className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className) }, props)));
36
+ return (_jsx(SheetPrimitive.Overlay, Object.assign({ "data-slot": "sheet-overlay", className: mergeClassNames("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className) }, props)));
37
37
  }
38
38
  function SheetContent(params) {
39
39
  const { className, children, side = "right", showCloseButton = true } = params, props = __rest(params, ["className", "children", "side", "showCloseButton"]);
40
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: cn("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className) }, props, { children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true, children: _jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] }))] }));
40
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: mergeClassNames("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className) }, props, { children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true, children: _jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] }))] }));
41
41
  }
42
42
  function SheetHeader(params) {
43
43
  const { className } = params, props = __rest(params, ["className"]);
44
- return (_jsx("div", Object.assign({ "data-slot": "sheet-header", className: cn("gap-1.5 p-4 flex flex-col", className) }, props)));
44
+ return (_jsx("div", Object.assign({ "data-slot": "sheet-header", className: mergeClassNames("gap-1.5 p-4 flex flex-col", className) }, props)));
45
45
  }
46
46
  function SheetFooter(params) {
47
47
  const { className } = params, props = __rest(params, ["className"]);
48
- return (_jsx("div", Object.assign({ "data-slot": "sheet-footer", className: cn("gap-2 p-4 mt-auto flex flex-col", className) }, props)));
48
+ return (_jsx("div", Object.assign({ "data-slot": "sheet-footer", className: mergeClassNames("gap-2 p-4 mt-auto flex flex-col", className) }, props)));
49
49
  }
50
50
  function SheetTitle(params) {
51
51
  const { className } = params, props = __rest(params, ["className"]);
52
- return (_jsx(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: cn("text-foreground font-medium", className) }, props)));
52
+ return (_jsx(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: mergeClassNames("text-foreground font-medium", className) }, props)));
53
53
  }
54
54
  function SheetDescription(params) {
55
55
  const { className } = params, props = __rest(params, ["className"]);
56
- return (_jsx(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: cn("text-muted-foreground text-sm", className) }, props)));
56
+ return (_jsx(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: mergeClassNames("text-muted-foreground text-sm", className) }, props)));
57
57
  }
58
58
  export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -10,8 +10,8 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { cn } from '../utils/cn/index.js';
13
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
14
14
  export function Skeleton(_a) {
15
15
  var { className } = _a, props = __rest(_a, ["className"]);
16
- return _jsx("div", Object.assign({ className: cn('animate-pulse rounded-md bg-muted', className) }, props));
16
+ return _jsx("div", Object.assign({ className: mergeClassNames('animate-pulse rounded-md bg-muted', className) }, props));
17
17
  }
@@ -10,10 +10,10 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { cn } from "../utils/cn/index.js";
13
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
14
14
  import { Loader2Icon } from "lucide-react";
15
15
  function Spinner(params) {
16
16
  const { className } = params, props = __rest(params, ["className"]);
17
- return (_jsx(Loader2Icon, Object.assign({ role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className) }, props)));
17
+ return (_jsx(Loader2Icon, Object.assign({ role: "status", "aria-label": "Loading", className: mergeClassNames("size-4 animate-spin", className) }, props)));
18
18
  }
19
19
  export { Spinner };
@@ -12,9 +12,9 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
14
  import { Switch as SwitchPrimitive } from 'radix-ui';
15
- import { cn } from '../utils/cn/index.js';
15
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
16
16
  function Switch(params) {
17
17
  const { className, size = 'default' } = params, props = __rest(params, ["className", "size"]);
18
- return (_jsx(SwitchPrimitive.Root, Object.assign({ "data-slot": "switch", "data-size": size, className: cn('data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50', className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { className: "bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform" }) })));
18
+ return (_jsx(SwitchPrimitive.Root, Object.assign({ "data-slot": "switch", "data-size": size, className: mergeClassNames('data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50', className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { className: "bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform" }) })));
19
19
  }
20
20
  export { Switch };
@@ -11,37 +11,37 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
- import { cn } from "../utils/cn/index.js";
14
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
15
15
  function Table(params) {
16
16
  const { className } = params, props = __rest(params, ["className"]);
17
- return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", Object.assign({ "data-slot": "table", className: cn("w-full caption-bottom text-sm", className) }, props)) }));
17
+ return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", Object.assign({ "data-slot": "table", className: mergeClassNames("w-full caption-bottom text-sm", className) }, props)) }));
18
18
  }
19
19
  function TableHeader(params) {
20
20
  const { className } = params, props = __rest(params, ["className"]);
21
- return (_jsx("thead", Object.assign({ "data-slot": "table-header", className: cn("[&_tr]:border-b", className) }, props)));
21
+ return (_jsx("thead", Object.assign({ "data-slot": "table-header", className: mergeClassNames("[&_tr]:border-b", className) }, props)));
22
22
  }
23
23
  function TableBody(params) {
24
24
  const { className } = params, props = __rest(params, ["className"]);
25
- return (_jsx("tbody", Object.assign({ "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className) }, props)));
25
+ return (_jsx("tbody", Object.assign({ "data-slot": "table-body", className: mergeClassNames("[&_tr:last-child]:border-0", className) }, props)));
26
26
  }
27
27
  function TableFooter(params) {
28
28
  const { className } = params, props = __rest(params, ["className"]);
29
- return (_jsx("tfoot", Object.assign({ "data-slot": "table-footer", className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className) }, props)));
29
+ return (_jsx("tfoot", Object.assign({ "data-slot": "table-footer", className: mergeClassNames("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className) }, props)));
30
30
  }
31
31
  function TableRow(params) {
32
32
  const { className } = params, props = __rest(params, ["className"]);
33
- return (_jsx("tr", Object.assign({ "data-slot": "table-row", className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className) }, props)));
33
+ return (_jsx("tr", Object.assign({ "data-slot": "table-row", className: mergeClassNames("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className) }, props)));
34
34
  }
35
35
  function TableHead(params) {
36
36
  const { className } = params, props = __rest(params, ["className"]);
37
- return (_jsx("th", Object.assign({ "data-slot": "table-head", className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0", className) }, props)));
37
+ return (_jsx("th", Object.assign({ "data-slot": "table-head", className: mergeClassNames("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0", className) }, props)));
38
38
  }
39
39
  function TableCell(params) {
40
40
  const { className } = params, props = __rest(params, ["className"]);
41
- return (_jsx("td", Object.assign({ "data-slot": "table-cell", className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className) }, props)));
41
+ return (_jsx("td", Object.assign({ "data-slot": "table-cell", className: mergeClassNames("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className) }, props)));
42
42
  }
43
43
  function TableCaption(params) {
44
44
  const { className } = params, props = __rest(params, ["className"]);
45
- return (_jsx("caption", Object.assign({ "data-slot": "table-caption", className: cn("text-muted-foreground mt-4 text-sm", className) }, props)));
45
+ return (_jsx("caption", Object.assign({ "data-slot": "table-caption", className: mergeClassNames("text-muted-foreground mt-4 text-sm", className) }, props)));
46
46
  }
47
47
  export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -14,10 +14,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import * as React from "react";
15
15
  import { cva } from "class-variance-authority";
16
16
  import { Tabs as TabsPrimitive } from "radix-ui";
17
- import { cn } from "../utils/cn/index.js";
17
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
18
18
  function Tabs(params) {
19
19
  const { className, orientation = "horizontal" } = params, props = __rest(params, ["className", "orientation"]);
20
- return (_jsx(TabsPrimitive.Root, Object.assign({ "data-slot": "tabs", "data-orientation": orientation, className: cn("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col", className) }, props)));
20
+ return (_jsx(TabsPrimitive.Root, Object.assign({ "data-slot": "tabs", "data-orientation": orientation, className: mergeClassNames("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col", className) }, props)));
21
21
  }
22
22
  const tabsListVariants = cva("rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", {
23
23
  variants: {
@@ -32,14 +32,14 @@ const tabsListVariants = cva("rounded-lg p-[3px] group-data-horizontal/tabs:h-9
32
32
  });
33
33
  function TabsList(params) {
34
34
  const { className, variant = "default" } = params, props = __rest(params, ["className", "variant"]);
35
- return (_jsx(TabsPrimitive.List, Object.assign({ "data-slot": "tabs-list", "data-variant": variant, className: cn(tabsListVariants({ variant }), className) }, props)));
35
+ return (_jsx(TabsPrimitive.List, Object.assign({ "data-slot": "tabs-list", "data-variant": variant, className: mergeClassNames(tabsListVariants({ variant }), className) }, props)));
36
36
  }
37
37
  function TabsTrigger(params) {
38
38
  const { className } = params, props = __rest(params, ["className"]);
39
- return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground", "after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className) }, props)));
39
+ return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: mergeClassNames("gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground", "after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className) }, props)));
40
40
  }
41
41
  function TabsContent(params) {
42
42
  const { className } = params, props = __rest(params, ["className"]);
43
- return (_jsx(TabsPrimitive.Content, Object.assign({ "data-slot": "tabs-content", className: cn("text-sm flex-1 outline-none", className) }, props)));
43
+ return (_jsx(TabsPrimitive.Content, Object.assign({ "data-slot": "tabs-content", className: mergeClassNames("text-sm flex-1 outline-none", className) }, props)));
44
44
  }
45
45
  export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -11,9 +11,9 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from 'react';
14
- import { cn } from '../utils/cn/index.js';
14
+ import { mergeClassNames } from '../utils/merge-class-names/index.js';
15
15
  function Textarea(params) {
16
16
  const { className } = params, props = __rest(params, ["className"]);
17
- return (_jsx("textarea", Object.assign({ "data-slot": "textarea", className: cn('border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50', className) }, props)));
17
+ return (_jsx("textarea", Object.assign({ "data-slot": "textarea", className: mergeClassNames('border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50', className) }, props)));
18
18
  }
19
19
  export { Textarea };
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import * as React from "react";
15
15
  import { Tooltip as TooltipPrimitive } from "radix-ui";
16
- import { cn } from "../utils/cn/index.js";
16
+ import { mergeClassNames } from "../utils/merge-class-names/index.js";
17
17
  function TooltipProvider(params) {
18
18
  const { delayDuration = 0 } = params, props = __rest(params, ["delayDuration"]);
19
19
  return (_jsx(TooltipPrimitive.Provider, Object.assign({ "data-slot": "tooltip-provider", delayDuration: delayDuration }, props)));
@@ -28,6 +28,6 @@ function TooltipTrigger(params) {
28
28
  }
29
29
  function TooltipContent(params) {
30
30
  const { className, sideOffset = 0, children } = params, props = __rest(params, ["className", "sideOffset", "children"]);
31
- return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, Object.assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-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 rounded-md px-3 py-1.5 text-xs bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)", className) }, props, { children: [children, _jsx(TooltipPrimitive.Arrow, { className: "size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]" })] })) }));
31
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, Object.assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: mergeClassNames("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-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 rounded-md px-3 py-1.5 text-xs bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)", className) }, props, { children: [children, _jsx(TooltipPrimitive.Arrow, { className: "size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]" })] })) }));
32
32
  }
33
33
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -3,14 +3,14 @@ import {} from 'react';
3
3
  import { AlertTriangle } from 'lucide-react';
4
4
  import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../components/alert-dialog.js';
5
5
  import { buttonVariants } from '../../components/button.js';
6
- import { cn } from '../../utils/cn/index.js';
6
+ import { mergeClassNames } from '../../utils/merge-class-names/index.js';
7
7
  /**
8
8
  * 统一的确认对话框组件
9
9
  */
10
10
  export function ConfirmDialog(params) {
11
11
  const { open, onOpenChange, title, description, confirmText = 'Confirm', cancelText = 'Cancel', variant = 'default', onConfirm, loading = false, impact, confirmPhrase, confirmValue = '', onConfirmValueChange, confirmPhraseLabel = (phrase) => `Type "${phrase}" to confirm`, } = params;
12
12
  const phraseValid = !confirmPhrase || confirmValue === confirmPhrase;
13
- return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: cn(variant === 'destructive' && 'flex items-center gap-2'), children: [variant === 'destructive' && _jsx(AlertTriangle, { className: "size-5 text-destructive" }), title] }), description && _jsx(AlertDialogDescription, { children: description }), impact && _jsx("div", { className: "rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: impact }), confirmPhrase && onConfirmValueChange && (_jsxs("div", { className: "space-y-2 text-sm", children: [_jsx("label", { htmlFor: "confirm-phrase", children: confirmPhraseLabel(confirmPhrase) }), _jsx("input", { id: "confirm-phrase", value: confirmValue, onChange: event => onConfirmValueChange(event.target.value), className: "w-full rounded-md border bg-background px-3 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring", autoComplete: "off" })] }))] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: loading, children: cancelText }), _jsx(AlertDialogAction, { className: cn(buttonVariants({ variant }), loading && 'opacity-50 cursor-not-allowed'), onClick: (e) => {
13
+ return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsxs(AlertDialogTitle, { className: mergeClassNames(variant === 'destructive' && 'flex items-center gap-2'), children: [variant === 'destructive' && _jsx(AlertTriangle, { className: "size-5 text-destructive" }), title] }), description && _jsx(AlertDialogDescription, { children: description }), impact && _jsx("div", { className: "rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: impact }), confirmPhrase && onConfirmValueChange && (_jsxs("div", { className: "space-y-2 text-sm", children: [_jsx("label", { htmlFor: "confirm-phrase", children: confirmPhraseLabel(confirmPhrase) }), _jsx("input", { id: "confirm-phrase", value: confirmValue, onChange: event => onConfirmValueChange(event.target.value), className: "w-full rounded-md border bg-background px-3 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring", autoComplete: "off" })] }))] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: loading, children: cancelText }), _jsx(AlertDialogAction, { className: mergeClassNames(buttonVariants({ variant }), loading && 'opacity-50 cursor-not-allowed'), onClick: (e) => {
14
14
  e.preventDefault();
15
15
  if (!loading) {
16
16
  onConfirm();