@buildkitgg/shadcn-baseui-sera 0.2.0 → 0.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 (77) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +25 -0
  3. package/dist/animations.css +23 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +1 -0
  6. package/dist/lib/utils.d.ts +1 -1
  7. package/dist/lib/utils.js +1 -1
  8. package/dist/shadcn.css +637 -0
  9. package/dist/styles-no-reset.css +1 -1
  10. package/dist/styles.css +1 -1
  11. package/dist/tailwind.css +45 -0
  12. package/dist/theme.css +63 -0
  13. package/dist/ui/accordion.js +2 -2
  14. package/dist/ui/alert-dialog.js +3 -3
  15. package/dist/ui/alert.js +3 -3
  16. package/dist/ui/aspect-ratio.js +1 -1
  17. package/dist/ui/attachment.js +2 -2
  18. package/dist/ui/avatar.js +2 -2
  19. package/dist/ui/badge.js +2 -2
  20. package/dist/ui/breadcrumb.js +7 -4
  21. package/dist/ui/bubble.js +4 -4
  22. package/dist/ui/button-group.js +2 -2
  23. package/dist/ui/button.js +5 -5
  24. package/dist/ui/calendar.js +9 -9
  25. package/dist/ui/card.js +1 -1
  26. package/dist/ui/carousel.js +19 -11
  27. package/dist/ui/chart.js +1 -1
  28. package/dist/ui/checkbox.js +1 -1
  29. package/dist/ui/code-block.js +3 -2
  30. package/dist/ui/combobox.d.ts +3 -1
  31. package/dist/ui/combobox.js +10 -7
  32. package/dist/ui/command.d.ts +1 -1
  33. package/dist/ui/command.js +7 -4
  34. package/dist/ui/context-menu.js +10 -10
  35. package/dist/ui/dialog.js +5 -3
  36. package/dist/ui/drawer.js +6 -6
  37. package/dist/ui/dropdown-menu.js +9 -9
  38. package/dist/ui/empty.js +1 -1
  39. package/dist/ui/field.js +3 -3
  40. package/dist/ui/hover-card.js +2 -2
  41. package/dist/ui/input-group.js +2 -2
  42. package/dist/ui/input-otp.js +1 -1
  43. package/dist/ui/input.js +1 -1
  44. package/dist/ui/item.js +2 -2
  45. package/dist/ui/kbd.js +1 -1
  46. package/dist/ui/label.js +1 -1
  47. package/dist/ui/marker.js +3 -3
  48. package/dist/ui/menubar.js +8 -8
  49. package/dist/ui/message-scroller.js +2 -2
  50. package/dist/ui/message.js +1 -1
  51. package/dist/ui/native-select.js +2 -2
  52. package/dist/ui/navigation-menu.js +4 -4
  53. package/dist/ui/pagination.d.ts +2 -2
  54. package/dist/ui/pagination.js +14 -7
  55. package/dist/ui/popover.js +2 -2
  56. package/dist/ui/progress.js +2 -2
  57. package/dist/ui/questionnaire.js +1 -1
  58. package/dist/ui/radio-group.js +2 -2
  59. package/dist/ui/resizable.js +2 -2
  60. package/dist/ui/scroll-area.js +2 -2
  61. package/dist/ui/select.js +4 -4
  62. package/dist/ui/separator.js +1 -1
  63. package/dist/ui/sheet.js +3 -2
  64. package/dist/ui/sidebar.js +15 -12
  65. package/dist/ui/skeleton.js +1 -1
  66. package/dist/ui/slider.js +1 -1
  67. package/dist/ui/spinner.js +4 -2
  68. package/dist/ui/switch.js +2 -2
  69. package/dist/ui/table.js +3 -3
  70. package/dist/ui/tabs.js +2 -2
  71. package/dist/ui/textarea.js +1 -1
  72. package/dist/ui/toast.js +5 -4
  73. package/dist/ui/toggle-group.js +2 -2
  74. package/dist/ui/toggle.js +4 -4
  75. package/dist/ui/tooltip.js +2 -2
  76. package/dist/ui/trace.js +5 -5
  77. package/package.json +12 -4
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Combobox as ComboboxPrimitive } from "@base-ui/react";
5
- import { cn } from "cn";
5
+ import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
6
6
  import { Button } from "./button.js";
7
7
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from "./input-group.js";
8
8
  import { ChevronDownIcon, XIcon, CheckIcon } from "lucide-react";
@@ -11,22 +11,24 @@ function ComboboxValue({ ...props }) {
11
11
  return _jsx(ComboboxPrimitive.Value, { "data-slot": "combobox-value", ...props });
12
12
  }
13
13
  function ComboboxTrigger({ className, children, ...props }) {
14
- return (_jsxs(ComboboxPrimitive.Trigger, { "data-slot": "combobox-trigger", className: cn("[&_svg:not([class*='size-'])]:size-3.5", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground size-3.5 pointer-events-none" })] }));
14
+ const { strings } = useShadcnLocalization();
15
+ return (_jsxs(ComboboxPrimitive.Trigger, { "aria-label": children == null ? strings.showOptions : undefined, "data-slot": "combobox-trigger", className: cn("[&_svg:not([class*='size-'])]:size-3.5", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground size-3.5 pointer-events-none" })] }));
15
16
  }
16
17
  function ComboboxClear({ className, ...props }) {
17
- return (_jsx(ComboboxPrimitive.Clear, { "data-slot": "combobox-clear", render: _jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }), className: cn(className), ...props, children: _jsx(XIcon, { className: "pointer-events-none" }) }));
18
+ const { strings } = useShadcnLocalization();
19
+ return (_jsx(ComboboxPrimitive.Clear, { "aria-label": strings.clear, "data-slot": "combobox-clear", render: _jsx(InputGroupButton, { variant: "ghost", size: "icon-xs" }), className: cn(className), ...props, children: _jsx(XIcon, { className: "pointer-events-none" }) }));
18
20
  }
19
21
  function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
20
22
  return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", render: _jsx(ComboboxTrigger, {}), "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
21
23
  }
22
24
  function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
23
- return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, 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 *:data-[slot=input-group]:bg-transparent overflow-hidden rounded-none shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1.5 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-transparent *:data-[slot=input-group]:focus-within:border-transparent *:data-[slot=input-group]:px-2.5 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)", className), ...props }) }) }));
25
+ return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, 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 *:data-[slot=input-group]:bg-transparent overflow-hidden rounded-none shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1.5 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-transparent *:data-[slot=input-group]:focus-within:border-transparent *:data-[slot=input-group]:px-2.5 data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2 cn-menu-target cn-menu-translucent group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)", className), ...props }) }) }));
24
26
  }
25
27
  function ComboboxList({ className, ...props }) {
26
28
  return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1.5 p-1.5 data-empty:p-0 overflow-y-auto overscroll-contain", className), ...props }));
27
29
  }
28
30
  function ComboboxItem({ className, children, ...props }) {
29
- return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-none py-2 pr-8 pl-3 text-sm [&_svg:not([class*='size-'])]:size-3.5 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: [children, _jsx(ComboboxPrimitive.ItemIndicator, { render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none" }) })] }));
31
+ return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-none py-2 pe-8 ps-3 text-sm [&_svg:not([class*='size-'])]:size-3.5 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: [children, _jsx(ComboboxPrimitive.ItemIndicator, { render: _jsx("span", { className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none" }) })] }));
30
32
  }
31
33
  function ComboboxGroup({ className, ...props }) {
32
34
  return (_jsx(ComboboxPrimitive.Group, { "data-slot": "combobox-group", className: cn(className), ...props }));
@@ -46,8 +48,9 @@ function ComboboxSeparator({ className, ...props }) {
46
48
  function ComboboxChips({ className, ...props }) {
47
49
  return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("border-transparent border-b-input bg-transparent focus-within:border-b-ring has-aria-invalid:border-b-destructive dark:has-aria-invalid:border-b-destructive/50 flex min-h-10 flex-wrap items-center gap-1.5 rounded-none border bg-clip-padding px-0 py-1.5 text-sm transition-[color,border-color] has-data-[slot=combobox-chip]:px-0", className), ...props }));
48
50
  }
49
- function ComboboxChip({ className, children, showRemove = true, ...props }) {
50
- return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("bg-muted text-foreground flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-none px-2 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
51
+ function ComboboxChip({ removeLabel, className, children, showRemove = true, ...props }) {
52
+ const { strings } = useShadcnLocalization();
53
+ return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("bg-muted text-foreground flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-none px-2 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pe-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { "aria-label": removeLabel ?? (typeof children === "string" ? strings.removeItem(children) : strings.remove), render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ms-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
51
54
  }
52
55
  function ComboboxChipsInput({ className, ...props }) {
53
56
  return (_jsx(ComboboxPrimitive.Input, { "data-slot": "combobox-chip-input", className: cn("min-w-16 flex-1 outline-none", className), ...props }));
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { Command as CommandPrimitive } from "cmdk";
3
3
  import { Dialog } from "./dialog.js";
4
4
  declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
- declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
5
+ declare function CommandDialog({ title: titleProp, description: descriptionProp, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
6
6
  title?: string;
7
7
  description?: string;
8
8
  className?: string;
@@ -1,14 +1,17 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Command as CommandPrimitive } from "cmdk";
4
- import { cn } from "cn";
4
+ import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
5
5
  import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog.js";
6
6
  import { InputGroup, InputGroupAddon, } from "./input-group.js";
7
7
  import { SearchIcon, CheckIcon } from "lucide-react";
8
8
  function Command({ className, ...props }) {
9
9
  return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("bg-popover text-popover-foreground flex size-full flex-col overflow-hidden", className), ...props }));
10
10
  }
11
- function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) {
11
+ function CommandDialog({ title: titleProp, description: descriptionProp, children, className, showCloseButton = false, ...props }) {
12
+ const { strings } = useShadcnLocalization();
13
+ const description = descriptionProp === undefined ? strings.commandDescription : descriptionProp;
14
+ const title = titleProp === undefined ? strings.commandPalette : titleProp;
12
15
  return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("top-1/3 translate-y-0 overflow-hidden p-0", className), showCloseButton: showCloseButton, children: children })] }));
13
16
  }
14
17
  function CommandInput({ className, ...props }) {
@@ -27,9 +30,9 @@ function CommandSeparator({ className, ...props }) {
27
30
  return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("bg-border/50 -mx-1.5 my-1.5 h-px", className), ...props }));
28
31
  }
29
32
  function CommandItem({ className, children, ...props }) {
30
- return (_jsxs(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none [&_svg:not([class*='size-'])]:size-3.5 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })] }));
33
+ return (_jsxs(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-none [&_svg:not([class*='size-'])]:size-3.5 group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(CheckIcon, { className: "ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })] }));
31
34
  }
32
35
  function CommandShortcut({ className, ...props }) {
33
- return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest", className), ...props }));
36
+ return (_jsx("span", { "data-slot": "command-shortcut", className: cn("text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest", className), ...props }));
34
37
  }
35
38
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
6
  function ContextMenu({ ...props }) {
7
7
  return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
@@ -12,40 +12,40 @@ function ContextMenuPortal({ ...props }) {
12
12
  function ContextMenuTrigger({ className, ...props }) {
13
13
  return (_jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", className: cn("select-none", className), ...props }));
14
14
  }
15
- function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) {
16
- return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("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 bg-popover text-popover-foreground min-w-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none", className), ...props }) }) }));
15
+ function ContextMenuContent({ className, align = "start", alignOffset = 4, side = "inline-end", sideOffset = 0, ...props }) {
16
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(ContextMenuPrimitive.Popup, { "data-slot": "context-menu-content", className: cn("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 bg-popover text-popover-foreground min-w-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2 cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none", className), ...props }) }) }));
17
17
  }
18
18
  function ContextMenuGroup({ ...props }) {
19
19
  return (_jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
20
20
  }
21
21
  function ContextMenuLabel({ className, inset, ...props }) {
22
- return (_jsx(ContextMenuPrimitive.GroupLabel, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-3 py-2 text-xs uppercase tracking-wider data-inset:pl-9.5 font-semibold text-muted-foreground", className), ...props }));
22
+ return (_jsx(ContextMenuPrimitive.GroupLabel, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-3 py-2 text-xs uppercase tracking-wider data-inset:ps-9.5 font-semibold text-muted-foreground", className), ...props }));
23
23
  }
24
24
  function ContextMenuItem({ className, inset, variant = "default", ...props }) {
25
- return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex 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 }));
25
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive focus:*:[svg]:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex 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 }));
26
26
  }
27
27
  function ContextMenuSub({ ...props }) {
28
28
  return (_jsx(ContextMenuPrimitive.SubmenuRoot, { "data-slot": "context-menu-sub", ...props }));
29
29
  }
30
30
  function ContextMenuSubTrigger({ className, inset, children, ...props }) {
31
- return (_jsxs(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })] }));
31
+ return (_jsxs(ContextMenuPrimitive.SubmenuTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "rtl:rotate-180 ms-auto" })] }));
32
32
  }
33
33
  function ContextMenuSubContent({ ...props }) {
34
- return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "shadow-md cn-menu-target cn-menu-translucent", side: "right", ...props }));
34
+ return (_jsx(ContextMenuContent, { "data-slot": "context-menu-sub-content", className: "shadow-md cn-menu-target cn-menu-translucent", side: "inline-end", ...props }));
35
35
  }
36
36
  function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }) {
37
- return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground gap-2.5 rounded-none py-2 pr-8 pl-3 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "absolute right-2 pointer-events-none", children: _jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
37
+ return (_jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground gap-2.5 rounded-none py-2 pe-8 ps-3 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "absolute end-2 pointer-events-none", children: _jsx(ContextMenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
38
38
  }
39
39
  function ContextMenuRadioGroup({ ...props }) {
40
40
  return (_jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props }));
41
41
  }
42
42
  function ContextMenuRadioItem({ className, children, inset, ...props }) {
43
- return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground gap-2.5 rounded-none py-2 pr-8 pl-3 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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: "absolute right-2 pointer-events-none", children: _jsx(ContextMenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
43
+ return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground gap-2.5 rounded-none py-2 pe-8 ps-3 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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: "absolute end-2 pointer-events-none", children: _jsx(ContextMenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
44
44
  }
45
45
  function ContextMenuSeparator({ className, ...props }) {
46
46
  return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("bg-border/50 -mx-1.5 my-1.5 h-px", className), ...props }));
47
47
  }
48
48
  function ContextMenuShortcut({ className, ...props }) {
49
- return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-xs tracking-widest", className), ...props }));
49
+ return (_jsx("span", { "data-slot": "context-menu-shortcut", className: cn("text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest", className), ...props }));
50
50
  }
51
51
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
package/dist/ui/dialog.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
4
- import { cn } from "cn";
4
+ import { cn, useShadcnLocalization } from "@buildkitgg/shadcn-runtime";
5
5
  import { Button } from "./button.js";
6
6
  import { XIcon } from "lucide-react";
7
7
  function Dialog({ ...props }) {
@@ -20,13 +20,15 @@ function DialogOverlay({ className, ...props }) {
20
20
  return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm fixed inset-0 isolate z-50", className), ...props }));
21
21
  }
22
22
  function DialogContent({ className, children, showCloseButton = true, ...props }) {
23
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", 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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-6 rounded-none p-6 text-sm shadow-md ring-1 duration-100 sm:max-w-md fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 right-5 bg-secondary", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
23
+ const { strings } = useShadcnLocalization();
24
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", 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 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-6 rounded-none p-6 text-sm shadow-md ring-1 duration-100 sm:max-w-md fixed top-1/2 start-1/2 z-50 w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 outline-none", className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-5 end-5 bg-secondary", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: strings.close })] }))] })] }));
24
25
  }
25
26
  function DialogHeader({ className, ...props }) {
26
27
  return (_jsx("div", { "data-slot": "dialog-header", className: cn("gap-2 flex flex-col", className), ...props }));
27
28
  }
28
29
  function DialogFooter({ className, showCloseButton = false, children, ...props }) {
29
- return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: "Close" }))] }));
30
+ const { strings } = useShadcnLocalization();
31
+ return (_jsxs("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { render: _jsx(Button, { variant: "outline" }), children: strings.close }))] }));
30
32
  }
31
33
  function DialogTitle({ className, ...props }) {
32
34
  return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg font-semibold leading-none uppercase tracking-wider cn-font-heading", className), ...props }));
package/dist/ui/drawer.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
5
- import { cn } from "cn";
5
+ import { cn } from "@buildkitgg/shadcn-runtime";
6
6
  const DrawerContext = React.createContext(null);
7
7
  function useDrawer() {
8
8
  const context = React.useContext(DrawerContext);
@@ -36,11 +36,11 @@ function DrawerContent({ className, children, ...props }) {
36
36
  const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
37
37
  return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && (_jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : undefined })), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto", children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-swipe-axis": swipeAxis, "data-snap-points": hasSnapPoints ? "" : undefined, className: cn(
38
38
  // Base.
39
- "bg-popover text-popover-foreground text-sm data-[swipe-direction=down]:rounded-none data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-none data-[swipe-direction=up]:border-b group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords]",
39
+ "bg-popover text-popover-foreground text-sm data-[swipe-direction=down]:rounded-none data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:border-e data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:border-s data-[swipe-direction=up]:rounded-none data-[swipe-direction=up]:border-b group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords]",
40
40
  // Nested.
41
41
  "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
42
42
  // Bleed.
43
- "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
43
+ "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:end-full data-[swipe-direction=right]:after:start-full data-[swipe-direction=up]:after:bottom-full",
44
44
  // Sizing.
45
45
  "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
46
46
  // Stack.
@@ -56,12 +56,12 @@ function DrawerContent({ className, children, ...props }) {
56
56
  // Direction: up.
57
57
  "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]",
58
58
  // Direction: left.
59
- "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
59
+ "data-[swipe-direction=left]:start-0 data-[swipe-direction=left]:origin-start data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
60
60
  // Direction: right.
61
- "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
61
+ "data-[swipe-direction=right]:end-0 data-[swipe-direction=right]:origin-end data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"), children: children })] }) })] }));
62
62
  }
63
63
  function DrawerHeader({ className, ...props }) {
64
- return (_jsx("div", { "data-slot": "drawer-header", className: cn("gap-1 p-4 pb-0 md:gap-2 md:text-left flex shrink-0 flex-col group-data-[swipe-axis=y]/drawer-popup:text-center", className), ...props }));
64
+ return (_jsx("div", { "data-slot": "drawer-header", className: cn("gap-1 p-4 pb-0 md:gap-2 md:text-start flex shrink-0 flex-col group-data-[swipe-axis=y]/drawer-popup:text-center", className), ...props }));
65
65
  }
66
66
  function DrawerFooter({ className, ...props }) {
67
67
  return (_jsx("div", { "data-slot": "drawer-footer", className: cn("gap-2 p-4 pt-0 mt-auto flex shrink-0 flex-col", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  import { ChevronRightIcon, CheckIcon } from "lucide-react";
6
6
  function DropdownMenu({ ...props }) {
7
7
  return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
@@ -13,39 +13,39 @@ function DropdownMenuTrigger({ ...props }) {
13
13
  return _jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
14
14
  }
15
15
  function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, ...props }) {
16
- return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("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 bg-popover text-popover-foreground min-w-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden", className), ...props }) }) }));
16
+ return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn("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 bg-popover text-popover-foreground min-w-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2 cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden", className), ...props }) }) }));
17
17
  }
18
18
  function DropdownMenuGroup({ ...props }) {
19
19
  return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
20
20
  }
21
21
  function DropdownMenuLabel({ className, inset, ...props }) {
22
- return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-3 py-2 text-xs uppercase tracking-wider data-inset:pl-9.5 font-semibold text-muted-foreground", className), ...props }));
22
+ return (_jsx(MenuPrimitive.GroupLabel, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-3 py-2 text-xs uppercase tracking-wider data-inset:ps-9.5 font-semibold text-muted-foreground", className), ...props }));
23
23
  }
24
24
  function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
25
- return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/dropdown-menu-item relative flex 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 }));
25
+ return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/dropdown-menu-item relative flex 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 }));
26
26
  }
27
27
  function DropdownMenuSub({ ...props }) {
28
28
  return _jsx(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
29
29
  }
30
30
  function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
31
- return (_jsxs(MenuPrimitive.SubmenuTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default items-center outline-hidden select-none data-popup-open:bg-accent data-popup-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })] }));
31
+ return (_jsxs(MenuPrimitive.SubmenuTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 flex cursor-default items-center outline-hidden select-none data-popup-open:bg-accent data-popup-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "rtl:rotate-180 ms-auto" })] }));
32
32
  }
33
- function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }) {
33
+ function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "inline-end", sideOffset = 0, className, ...props }) {
34
34
  return (_jsx(DropdownMenuContent, { "data-slot": "dropdown-menu-sub-content", className: cn("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 bg-popover text-popover-foreground min-w-36 rounded-none p-1.5 shadow-md ring-1 duration-100 cn-menu-target cn-menu-translucent w-auto", className), align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, ...props }));
35
35
  }
36
36
  function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
37
- return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pr-8 pl-3 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "absolute right-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
37
+ return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pe-8 ps-3 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "absolute end-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
38
38
  }
39
39
  function DropdownMenuRadioGroup({ ...props }) {
40
40
  return (_jsx(MenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
41
41
  }
42
42
  function DropdownMenuRadioItem({ className, children, inset, ...props }) {
43
- return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pr-8 pl-3 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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: "absolute right-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
43
+ return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pe-8 ps-3 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex 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: "absolute end-2 flex items-center justify-center pointer-events-none", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
44
44
  }
45
45
  function DropdownMenuSeparator({ className, ...props }) {
46
46
  return (_jsx(MenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border/50 -mx-1.5 my-1.5 h-px", className), ...props }));
47
47
  }
48
48
  function DropdownMenuShortcut({ className, ...props }) {
49
- return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest", className), ...props }));
49
+ return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest", className), ...props }));
50
50
  }
51
51
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
package/dist/ui/empty.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
- import { cn } from "cn";
3
+ import { cn } from "@buildkitgg/shadcn-runtime";
4
4
  function Empty({ className, ...props }) {
5
5
  return (_jsx("div", { "data-slot": "empty", className: cn("gap-4 border-dashed p-12 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance", className), ...props }));
6
6
  }
package/dist/ui/field.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useMemo } from "react";
4
4
  import { cva } from "class-variance-authority";
5
- import { cn } from "cn";
5
+ import { cn } from "@buildkitgg/shadcn-runtime";
6
6
  import { Label } from "./label.js";
7
7
  import { Separator } from "./separator.js";
8
8
  function FieldSet({ className, ...props }) {
@@ -39,7 +39,7 @@ function FieldTitle({ className, ...props }) {
39
39
  return (_jsx("div", { "data-slot": "field-label", className: cn("gap-2 group-data-[disabled=true]/field:opacity-50 font-semibold uppercase in-data-[slot=field-label]:font-semibold text-xs flex w-fit items-center", className), ...props }));
40
40
  }
41
41
  function FieldDescription({ className, ...props }) {
42
- return (_jsx("p", { "data-slot": "field-description", className: cn("text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 normal-case tracking-normal leading-normal font-normal group-has-data-horizontal/field:text-balance", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
42
+ return (_jsx("p", { "data-slot": "field-description", className: cn("text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 normal-case tracking-normal leading-normal font-normal group-has-data-horizontal/field:text-balance", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
43
43
  }
44
44
  function FieldSeparator({ children, className, ...props }) {
45
45
  return (_jsxs("div", { "data-slot": "field-separator", "data-content": !!children, className: cn("-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative", className), ...props, children: [_jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && (_jsx("span", { className: "text-muted-foreground px-2 relative mx-auto block w-fit bg-background", "data-slot": "field-separator-content", children: children }))] }));
@@ -58,7 +58,7 @@ function FieldError({ className, children, errors, ...props }) {
58
58
  if (uniqueErrors?.length == 1) {
59
59
  return uniqueErrors[0]?.message;
60
60
  }
61
- return (_jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
61
+ return (_jsx("ul", { className: "ms-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => error?.message && _jsx("li", { children: error.message }, index)) }));
62
62
  }, [children, errors]);
63
63
  if (!content) {
64
64
  return null;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  function HoverCard({ ...props }) {
6
6
  return _jsx(PreviewCardPrimitive.Root, { "data-slot": "hover-card", ...props });
7
7
  }
@@ -9,6 +9,6 @@ function HoverCardTrigger({ ...props }) {
9
9
  return (_jsx(PreviewCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props }));
10
10
  }
11
11
  function HoverCardContent({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) {
12
- return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn("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 bg-popover text-popover-foreground w-72 p-4 text-sm shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 origin-(--transform-origin) outline-hidden", className), ...props }) }) }));
12
+ return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn("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 bg-popover text-popover-foreground w-72 p-4 text-sm shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2 z-50 origin-(--transform-origin) outline-hidden", className), ...props }) }) }));
13
13
  }
14
14
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  import { Button } from "./button.js";
6
6
  import { Input } from "./input.js";
7
7
  import { Textarea } from "./textarea.js";
@@ -49,7 +49,7 @@ function InputGroupText({ className, ...props }) {
49
49
  return (_jsx("span", { className: cn("text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-3.5 flex items-center [&_svg]:pointer-events-none", className), ...props }));
50
50
  }
51
51
  function InputGroupInput({ className, ...props }) {
52
- return (_jsx(Input, { "data-slot": "input-group-control", className: cn("border-0 bg-transparent ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent group-has-[>[data-align=inline-start]]/input-group:pl-2 group-has-[>[data-align=inline-end]]/input-group:pr-2 flex-1", className), ...props }));
52
+ return (_jsx(Input, { "data-slot": "input-group-control", className: cn("border-0 bg-transparent ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent group-has-[>[data-align=inline-start]]/input-group:ps-2 group-has-[>[data-align=inline-end]]/input-group:pe-2 flex-1", className), ...props }));
53
53
  }
54
54
  function InputGroupTextarea({ className, ...props }) {
55
55
  return (_jsx(Textarea, { "data-slot": "input-group-control", className: cn("border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  import { OTPInput, OTPInputContext } from "input-otp";
6
6
  import { MinusIcon } from "lucide-react";
7
7
  function InputOTP({ className, containerClassName, ...props }) {
package/dist/ui/input.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Input as InputPrimitive } from "@base-ui/react/input";
3
- import { cn } from "cn";
3
+ import { cn } from "@buildkitgg/shadcn-runtime";
4
4
  function Input({ className, type, ...props }) {
5
5
  return (_jsx(InputPrimitive, { type: type, "data-slot": "input", className: cn("border-transparent border-b-input bg-transparent focus-visible:border-b-ring aria-invalid:border-b-destructive dark:aria-invalid:border-b-destructive/50 h-10 border px-0 py-1 text-base transition-[color,border-color] file:h-7 file:text-sm file:font-medium md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className), ...props }));
6
6
  }
package/dist/ui/item.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { mergeProps } from "@base-ui/react/merge-props";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
4
  import { cva } from "class-variance-authority";
5
- import { cn } from "cn";
5
+ import { cn } from "@buildkitgg/shadcn-runtime";
6
6
  import { Separator } from "./separator.js";
7
7
  function ItemGroup({ className, ...props }) {
8
8
  return (_jsx("div", { 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 }));
@@ -64,7 +64,7 @@ function ItemTitle({ className, ...props }) {
64
64
  return (_jsx("div", { "data-slot": "item-title", className: cn("gap-2 text-xs leading-snug font-semibold uppercase underline-offset-4 line-clamp-1 flex w-fit items-center", className), ...props }));
65
65
  }
66
66
  function ItemDescription({ className, ...props }) {
67
- return (_jsx("p", { "data-slot": "item-description", className: cn("text-muted-foreground text-left text-sm leading-relaxed line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
67
+ return (_jsx("p", { "data-slot": "item-description", className: cn("text-muted-foreground text-start text-sm leading-relaxed line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
68
68
  }
69
69
  function ItemActions({ className, ...props }) {
70
70
  return (_jsx("div", { "data-slot": "item-actions", className: cn("gap-2 flex items-center", className), ...props }));
package/dist/ui/kbd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from "cn";
2
+ import { cn } from "@buildkitgg/shadcn-runtime";
3
3
  function Kbd({ className, ...props }) {
4
4
  return (_jsx("kbd", { "data-slot": "kbd", className: cn("bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5.5 w-fit min-w-5.5 gap-1 rounded-none px-1.5 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 in-data-[slot=input-group]:bg-input pointer-events-none inline-flex items-center justify-center select-none", className), ...props }));
5
5
  }
package/dist/ui/label.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from "cn";
3
+ import { cn } from "@buildkitgg/shadcn-runtime";
4
4
  function Label({ className, ...props }) {
5
5
  return (_jsx("label", { "data-slot": "label", className: cn("gap-2 font-semibold peer-data-[slot=checkbox]:text-sm peer-data-[slot=radio-group-item]:text-sm peer-data-[slot=switch]:text-sm group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 peer-data-[slot=checkbox]:font-normal peer-data-[slot=radio-group-item]:font-normal peer-data-[slot=switch]:font-normal uppercase text-xs tracking-wide peer-data-[slot=checkbox]:normal-case peer-data-[slot=checkbox]:tracking-normal peer-data-[slot=radio-group-item]:normal-case peer-data-[slot=radio-group-item]:tracking-normal peer-data-[slot=switch]:normal-case peer-data-[slot=switch]:tracking-normal flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", className), ...props }));
6
6
  }
package/dist/ui/marker.js CHANGED
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { mergeProps } from "@base-ui/react/merge-props";
3
3
  import { useRender } from "@base-ui/react/use-render";
4
4
  import { cva } from "class-variance-authority";
5
- import { cn } from "cn";
6
- const markerVariants = cva("gap-2 text-xs text-muted-foreground [a]:hover:text-foreground [a]:underline-offset-3 [a]:underline [&_svg:not([class*='size-'])]:size-4 min-h-4 text-left uppercase tracking-wide group/marker relative flex w-full items-center", {
5
+ import { cn } from "@buildkitgg/shadcn-runtime";
6
+ const markerVariants = cva("gap-2 text-xs text-muted-foreground [a]:hover:text-foreground [a]:underline-offset-3 [a]:underline [&_svg:not([class*='size-'])]:size-4 min-h-4 text-start uppercase tracking-wide group/marker relative flex w-full items-center", {
7
7
  variants: {
8
8
  variant: {
9
9
  default: "",
10
- separator: "before:h-px before:min-w-0 before:flex-1 before:bg-border after:h-px after:min-w-0 after:flex-1 after:bg-border before:mr-1 after:ml-1",
10
+ separator: "before:h-px before:min-w-0 before:flex-1 before:bg-border after:h-px after:min-w-0 after:flex-1 after:bg-border before:me-1 after:ms-1",
11
11
  border: "border-b border-border pb-2",
12
12
  },
13
13
  },
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
4
4
  import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
5
- import { cn } from "cn";
5
+ import { cn } from "@buildkitgg/shadcn-runtime";
6
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./dropdown-menu.js";
7
7
  import { CheckIcon } from "lucide-react";
8
8
  function Menubar({ className, ...props }) {
@@ -21,34 +21,34 @@ function MenubarTrigger({ className, ...props }) {
21
21
  return (_jsx(DropdownMenuTrigger, { "data-slot": "menubar-trigger", className: cn("hover:bg-muted aria-expanded:bg-muted rounded-none px-2 py-0.75 text-sm font-medium flex items-center outline-hidden select-none", className), ...props }));
22
22
  }
23
23
  function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
24
- return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-open:animate-in data-open:fade-in-0 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-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 cn-menu-target cn-menu-translucent", className), ...props }));
24
+ return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-open:animate-in data-open:fade-in-0 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-48 rounded-none p-1.5 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2 cn-menu-target cn-menu-translucent", className), ...props }));
25
25
  }
26
26
  function MenubarItem({ className, inset, variant = "default", ...props }) {
27
- return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-sm data-disabled:opacity-50 data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/menubar-item", className), ...props }));
27
+ return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2.5 rounded-none px-3 py-2 text-sm data-disabled:opacity-50 data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 group/menubar-item", className), ...props }));
28
28
  }
29
29
  function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
30
- return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pr-3 pl-9.5 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "left-3 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
30
+ return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pe-3 ps-9.5 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 relative flex 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), checked: checked, ...props, children: [_jsx("span", { className: "start-3 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
31
31
  }
32
32
  function MenubarRadioGroup({ ...props }) {
33
33
  return _jsx(DropdownMenuRadioGroup, { "data-slot": "menubar-radio-group", ...props });
34
34
  }
35
35
  function MenubarRadioItem({ className, children, inset, ...props }) {
36
- return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "menubar-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pr-3 pl-9.5 text-xs font-medium uppercase tracking-wider data-disabled:opacity-50 data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [_jsx("span", { className: "left-3 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
36
+ return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "menubar-radio-item", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2.5 rounded-none py-2 pe-3 ps-9.5 text-xs font-medium uppercase tracking-wider data-disabled:opacity-50 data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0", className), ...props, children: [_jsx("span", { className: "start-3 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(CheckIcon, {}) }) }), children] }));
37
37
  }
38
38
  function MenubarLabel({ className, inset, ...props }) {
39
- return (_jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-3.5 py-2 text-xs uppercase tracking-wider data-inset:pl-9.5 font-semibold text-muted-foreground", className), ...props }));
39
+ return (_jsx(DropdownMenuLabel, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-3.5 py-2 text-xs uppercase tracking-wider data-inset:ps-9.5 font-semibold text-muted-foreground", className), ...props }));
40
40
  }
41
41
  function MenubarSeparator({ className, ...props }) {
42
42
  return (_jsx(DropdownMenuSeparator, { "data-slot": "menubar-separator", className: cn("bg-border/50 -mx-1 my-1 h-px", className), ...props }));
43
43
  }
44
44
  function MenubarShortcut({ className, ...props }) {
45
- return (_jsx(DropdownMenuShortcut, { "data-slot": "menubar-shortcut", className: cn("text-muted-foreground group-focus/menubar-item:text-accent-foreground text-xs tracking-widest ml-auto", className), ...props }));
45
+ return (_jsx(DropdownMenuShortcut, { "data-slot": "menubar-shortcut", className: cn("text-muted-foreground group-focus/menubar-item:text-accent-foreground text-xs tracking-widest ms-auto", className), ...props }));
46
46
  }
47
47
  function MenubarSub({ ...props }) {
48
48
  return _jsx(DropdownMenuSub, { "data-slot": "menubar-sub", ...props });
49
49
  }
50
50
  function MenubarSubTrigger({ className, inset, ...props }) {
51
- return (_jsx(DropdownMenuSubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground gap-2 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-3.5", className), ...props }));
51
+ return (_jsx(DropdownMenuSubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground gap-2 rounded-none px-3 py-2 text-xs font-medium uppercase tracking-wider data-inset:ps-9.5 [&_svg:not([class*='size-'])]:size-3.5", className), ...props }));
52
52
  }
53
53
  function MenubarSubContent({ className, ...props }) {
54
54
  return (_jsx(DropdownMenuSubContent, { "data-slot": "menubar-sub-content", 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-32 rounded-none p-1.5 shadow-md ring-1 duration-100 cn-menu-target cn-menu-translucent", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "@shadcn/react/message-scroller";
4
- import { cn } from "cn";
4
+ import { cn } from "@buildkitgg/shadcn-runtime";
5
5
  import { Button } from "./button.js";
6
6
  import { ArrowDownIcon } from "lucide-react";
7
7
  function MessageScrollerProvider(props) {
@@ -20,6 +20,6 @@ function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
20
20
  return (_jsx(MessageScrollerPrimitive.Item, { "data-slot": "message-scroller-item", scrollAnchor: scrollAnchor, className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className), ...props }));
21
21
  }
22
22
  function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
23
- return (_jsx(MessageScrollerPrimitive.Button, { "data-slot": "message-scroller-button", "data-direction": direction, "data-variant": variant, "data-size": size, direction: direction, className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className), render: render ?? _jsx(Button, { variant: variant, size: size }), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDownIcon, {}), _jsx("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })] })) }));
23
+ return (_jsx(MessageScrollerPrimitive.Button, { "data-slot": "message-scroller-button", "data-direction": direction, "data-variant": variant, "data-size": size, direction: direction, className: cn("absolute inset-s-1/2 -translate-x-1/2 rtl:translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className), render: render ?? _jsx(Button, { variant: variant, size: size }), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsx(ArrowDownIcon, {}), _jsx("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })] })) }));
24
24
  }
25
25
  export { MessageScrollerProvider, MessageScroller, MessageScrollerViewport, MessageScrollerContent, MessageScrollerItem, MessageScrollerButton, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, };