@bmsuisse/ui 0.4.5 → 0.4.6
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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var Input = forwardRef2(({ className, type, ...props }, ref) => {
|
|
|
65
65
|
{
|
|
66
66
|
type,
|
|
67
67
|
className: cn(
|
|
68
|
-
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
68
|
+
"flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
69
69
|
className
|
|
70
70
|
),
|
|
71
71
|
ref,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/primitives/button.tsx","../src/lib/utils.ts","../src/primitives/input.tsx","../src/primitives/label.tsx","../src/primitives/textarea.tsx","../src/primitives/card.tsx","../src/primitives/badge.tsx","../src/primitives/dialog.tsx","../src/primitives/popover.tsx","../src/primitives/select.tsx","../src/primitives/skeleton.tsx","../src/primitives/checkbox.tsx","../src/primitives/switch.tsx","../src/primitives/tabs.tsx","../src/primitives/separator.tsx","../src/primitives/scroll-area.tsx","../src/primitives/table.tsx","../src/primitives/dropdown-menu.tsx","../src/primitives/sheet.tsx","../src/primitives/tooltip.tsx","../src/patterns/modal/Modal.tsx","../src/patterns/modal/ConfirmDialog.tsx","../src/patterns/modal/FormModal.tsx","../src/patterns/form-field/FormField.tsx","../src/patterns/combobox/Combobox.tsx","../src/patterns/alert-box/AlertBox.tsx","../src/patterns/status-badge/StatusBadge.tsx","../src/patterns/loading-spinner/LoadingSpinner.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n secondary: \"bg-muted text-muted-foreground hover:bg-muted/80\",\n link: \"text-primary underline-offset-4 hover:underline\",\n // \"Swiss design\" red CTA, ported from akeneo_editor's old .btn-primary-swiss\n // naive-ui override. Relies on --color-swiss-primary/-hover and\n // --color-swiss-primary-foreground tokens defined by the consuming app's own\n // Tailwind theme (this package doesn't define them) — same pattern as AlertBox's\n // warning/info/success colors, which assume tokens the shared theme doesn't have.\n \"swiss-primary\":\n \"bg-swiss-primary text-swiss-primary-foreground font-semibold shadow-sm hover:bg-swiss-primary-hover hover:-translate-y-px active:translate-y-px\",\n \"swiss-secondary\":\n \"border border-input bg-background font-semibold text-foreground shadow-sm hover:bg-accent hover:-translate-y-px active:translate-y-px\",\n },\n size: {\n default: \"h-9 px-3\",\n xs: \"h-7 px-2 text-xs\",\n sm: \"h-8 px-2 text-xs\",\n lg: \"h-10 px-4\",\n icon: \"h-9 w-9\",\n \"icon-xs\": \"h-7 w-7\",\n \"icon-sm\": \"h-8 w-8\",\n \"icon-lg\": \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n },\n);\nButton.displayName = \"Button\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/** Merges conditional class names, then dedupes conflicting Tailwind utility classes. */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import type { InputHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport type InputProps = InputHTMLAttributes<HTMLInputElement>;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n});\nInput.displayName = \"Input\";\n","import type { LabelHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Label = forwardRef<HTMLLabelElement, LabelHTMLAttributes<HTMLLabelElement>>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className,\n )}\n {...props}\n />\n ),\n);\nLabel.displayName = \"Label\";\n","import type { TextareaHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => (\n <textarea\n className={cn(\n \"flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n ),\n);\nTextarea.displayName = \"Textarea\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\n// Deliberately uses bg-background/text-foreground rather than shadcn's usual\n// bg-card/text-card-foreground tokens: the reference consumer app's actual\n// token set (which this package's demo/theme mirrors) has no --card token,\n// and adding one just for this component would be a second, redundant\n// \"surface\" token to keep in sync.\nexport const Card = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"rounded-lg border bg-background text-foreground shadow-sm\", className)} {...props} />\n);\n\nexport const CardHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5 p-6\", className)} {...props} />\n);\n\nexport const CardTitle = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)} {...props} />\n);\n\nexport const CardDescription = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n);\n\nexport const CardContent = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => <div className={cn(\"p-6 pt-0\", className)} {...props} />;\n\nexport const CardFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex items-center gap-2 p-6 pt-0\", className)} {...props} />\n);\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground\",\n secondary: \"border-transparent bg-muted text-muted-foreground\",\n destructive: \"border-transparent bg-destructive text-destructive-foreground\",\n outline: \"border-input text-foreground\",\n // Amber warning tone — same fixed-palette choice as AlertBox/StatusBadge's\n // warning tone, since the shared theme has no warning token yet.\n warning: \"border-transparent bg-amber-100 text-amber-900 dark:bg-amber-900/40 dark:text-amber-200\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nexport const Badge = ({ className, variant, ...props }: BadgeProps): ReactElement => (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n);\n","import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n\nexport const DialogOverlay = forwardRef<\n ElementRef<typeof DialogPrimitive.Overlay>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/50\", className)}\n {...props}\n />\n));\nDialogOverlay.displayName = \"DialogOverlay\";\n\nexport const DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n /** data-testid for the built-in header close button, since it renders no DOM a caller controls directly. */\n closeButtonTestId?: string;\n }\n>(({ className, children, showCloseButton = true, closeButtonTestId, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-full max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-lg border bg-background p-6 shadow-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton ? (\n <DialogPrimitive.Close\n data-testid={closeButtonTestId}\n className=\"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n));\nDialogContent.displayName = \"DialogContent\";\n\nexport const DialogHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5\", className)} {...props} />\n);\n\nexport const DialogTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold\", className)} {...props} />\n));\nDialogTitle.displayName = \"DialogTitle\";\n\nexport const DialogDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = \"DialogDescription\";\n\nexport const DialogFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex justify-end gap-2\", className)} {...props} />\n);\n","import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\nexport const PopoverContent = forwardRef<\n ElementRef<typeof PopoverPrimitive.Content>,\n ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n /** Portal target for the popover content. Defaults to `document.body` (Radix's\n * own default) when omitted. Needed when the popover is opened from inside a\n * modal Dialog/Sheet: Radix's Dialog `FocusScope` traps focus within its own\n * content subtree, and a popover portaled to `document.body` sits outside that\n * subtree — so pass the Dialog/Sheet content element here to portal into it\n * instead. */\n container?: ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>[\"container\"];\n }\n>(({ className, align = \"start\", sideOffset = 4, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = \"PopoverContent\";\n","import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Select = SelectPrimitive.Root;\nexport const SelectGroup = SelectPrimitive.Group;\nexport const SelectValue = SelectPrimitive.Value;\n\nexport interface SelectTriggerProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n size?: \"sm\" | \"default\";\n}\n\nexport const SelectTrigger = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, size = \"default\", ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n size === \"sm\" ? \"h-8\" : \"h-9\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n position === \"popper\" && \"translate-y-1\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"p-1\">{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = \"SelectContent\";\n\nexport const SelectItem = forwardRef<\n ElementRef<typeof SelectPrimitive.Item>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = \"SelectItem\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Skeleton = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"animate-pulse rounded-md bg-muted\", className)} {...props} />\n);\n","import * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Checkbox = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-input shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"h-3.5 w-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = \"Checkbox\";\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport interface SwitchProps extends ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {\n size?: \"sm\" | \"default\";\n}\n\nexport const Switch = forwardRef<ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(\n ({ className, size = \"default\", ...props }, ref) => (\n <SwitchPrimitive.Root\n ref={ref}\n className={cn(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n size === \"sm\" ? \"h-3.5 w-6\" : \"h-5 w-9\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0\",\n size === \"sm\"\n ? \"h-3 w-3 data-[state=checked]:translate-x-2.5\"\n : \"h-4 w-4 data-[state=checked]:translate-x-4\",\n )}\n />\n </SwitchPrimitive.Root>\n ),\n);\nSwitch.displayName = \"Switch\";\n","import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport const TabsList = forwardRef<\n ElementRef<typeof TabsPrimitive.List>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-[3px] text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\nTabsList.displayName = \"TabsList\";\n\nexport const TabsTrigger = forwardRef<\n ElementRef<typeof TabsPrimitive.Trigger>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium text-foreground/60 transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = \"TabsTrigger\";\n\nexport const TabsContent = forwardRef<\n ElementRef<typeof TabsPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content ref={ref} className={cn(\"flex-1 outline-none\", className)} {...props} />\n));\nTabsContent.displayName = \"TabsContent\";\n","import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Separator = forwardRef<\n ElementRef<typeof SeparatorPrimitive.Root>,\n ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className,\n )}\n {...props}\n />\n));\nSeparator.displayName = \"Separator\";\n","import * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const ScrollBar = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = \"ScrollBar\";\n\nexport const ScrollArea = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.Root>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn(\"relative overflow-hidden\", className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = \"ScrollArea\";\n","import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Table = forwardRef<HTMLTableElement, HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-x-auto\">\n <table ref={ref} className={cn(\"w-full caption-bottom text-sm\", className)} {...props} />\n </div>\n ),\n);\nTable.displayName = \"Table\";\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n ),\n);\nTableHeader.displayName = \"TableHeader\";\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(\"[&_tr:last-child]:border-0\", className)} {...props} />\n ),\n);\nTableBody.displayName = \"TableBody\";\n\nexport const TableFooter = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n {...props}\n />\n ),\n);\nTableFooter.displayName = \"TableFooter\";\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\", className)}\n {...props}\n />\n ),\n);\nTableRow.displayName = \"TableRow\";\n\nexport const TableHead = forwardRef<HTMLTableCellElement, ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0\",\n className,\n )}\n {...props}\n />\n ),\n);\nTableHead.displayName = \"TableHead\";\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\"whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n {...props}\n />\n ),\n);\nTableCell.displayName = \"TableCell\";\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, HTMLAttributes<HTMLTableCaptionElement>>(\n ({ className, ...props }, ref) => (\n <caption ref={ref} className={cn(\"mt-4 text-sm text-muted-foreground\", className)} {...props} />\n ),\n);\nTableCaption.displayName = \"TableCaption\";\n","import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nexport const DropdownMenuItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Item>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { danger?: boolean }\n>(({ className, danger, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n danger && \"text-destructive focus:bg-destructive/10 focus:text-destructive\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nexport const DropdownMenuCheckboxItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\nexport const DropdownMenuRadioItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nexport const DropdownMenuSeparator = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Separator>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nexport const DropdownMenuLabel = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Label>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-xs font-medium text-muted-foreground\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nexport const DropdownMenuShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\n);\n\nexport const DropdownMenuSubTrigger = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nexport const DropdownMenuSubContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Sheet = DialogPrimitive.Root;\nexport const SheetTrigger = DialogPrimitive.Trigger;\nexport const SheetClose = DialogPrimitive.Close;\nexport const SheetPortal = DialogPrimitive.Portal;\n\nexport const SheetOverlay = forwardRef<\n ElementRef<typeof DialogPrimitive.Overlay>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/50\", className)}\n {...props}\n />\n));\nSheetOverlay.displayName = \"SheetOverlay\";\n\n// Neither this package nor any other package in the monorepo depends on the\n// `tailwindcss-animate` plugin (grepped for \"animate-in\"/\"tailwindcss-animate\"\n// across the repo — the only pre-existing `data-[state=...]` usages are plain\n// color/background toggles, not that plugin's enter/exit keyframe utilities).\n// Rather than have @bmsuisse/ui silently assume a consumer has that plugin\n// installed, the slide transition here is done with Tailwind's built-in\n// `transition-transform` plus a `translate-x`/`translate-y` toggle driven off\n// Radix's own `data-[state=open]`/`data-[state=closed]` attributes.\nexport const sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\nexport interface SheetContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nexport const SheetContent = forwardRef<ElementRef<typeof DialogPrimitive.Content>, SheetContentProps>(\n ({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <DialogPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </SheetPortal>\n ),\n);\nSheetContent.displayName = \"SheetContent\";\n\nexport const SheetHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5\", className)} {...props} />\n);\n\nexport const SheetFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex justify-end gap-2\", className)} {...props} />\n);\n\nexport const SheetTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold\", className)} {...props} />\n));\nSheetTitle.displayName = \"SheetTitle\";\n\nexport const SheetDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = \"SheetDescription\";\n","import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = \"TooltipContent\";\n","import type { ReactElement, ReactNode } from \"react\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../../primitives/dialog\";\n\nexport interface ModalProps {\n /** Whether the modal is open. Modal is fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title, rendered in `DialogTitle`. */\n title: string;\n /** Optional supporting copy, rendered in `DialogDescription` under the title. */\n description?: string;\n /** Body content of the modal. */\n children: ReactNode;\n /** Optional footer content (typically action buttons), rendered in `DialogFooter`. */\n footer?: ReactNode;\n /** Extra classes applied to `DialogContent`, e.g. to override the default width. */\n className?: string;\n}\n\n/**\n * Base structural wrapper around the `@bmsuisse/ui` Dialog primitives: title,\n * optional description, body, and an optional footer. Use this directly for\n * modals that don't fit `ConfirmDialog` or `FormModal`; those two are built\n * on top of the same shape.\n */\nexport const Modal = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n footer,\n className,\n}: ModalProps): ReactElement => (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className={className}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? <DialogDescription>{description}</DialogDescription> : null}\n </DialogHeader>\n {children}\n {footer ? <DialogFooter>{footer}</DialogFooter> : null}\n </DialogContent>\n </Dialog>\n);\n","import type { ReactElement } from \"react\";\nimport { useState } from \"react\";\nimport { Button } from \"../../primitives/button\";\nimport { Modal } from \"./Modal\";\n\nexport interface ConfirmDialogProps {\n /** Whether the dialog is open. Fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title. */\n title: string;\n /** Optional supporting copy shown under the title. */\n description?: string;\n /** Label for the confirm button. Defaults to `\"Confirm\"`. */\n confirmLabel?: string;\n /** Label for the cancel button. Defaults to `\"Cancel\"`. */\n cancelLabel?: string;\n /** Called when the user clicks confirm. May return a promise; the dialog waits for it. */\n onConfirm: () => void | Promise<void>;\n /** Visual style of the confirm button. Defaults to `\"default\"`. */\n variant?: \"default\" | \"destructive\";\n /** Forwarded to the confirm button, for test targeting (e.g. Playwright/Testing Library). */\n confirmTestId?: string;\n /** Forwarded to the cancel button, for test targeting. */\n cancelTestId?: string;\n}\n\n/**\n * \"Are you sure?\" confirmation dialog. Unlike `FormModal`, this DOES close\n * itself automatically after a successful `onConfirm` — confirmations are a\n * single yes/no action with no follow-up state to inspect, so there's nothing\n * for the caller to decide. If `onConfirm` throws/rejects, the dialog stays\n * open and the error is not swallowed, so a caller can surface its own error\n * UI without the dialog disappearing out from under it.\n */\nexport const ConfirmDialog = ({\n open,\n onOpenChange,\n title,\n description,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n onConfirm,\n variant = \"default\",\n confirmTestId,\n cancelTestId,\n}: ConfirmDialogProps): ReactElement => {\n const [pending, setPending] = useState(false);\n\n const handleCancel = (): void => {\n onOpenChange(false);\n };\n\n const handleConfirm = async (): Promise<void> => {\n setPending(true);\n try {\n await onConfirm();\n onOpenChange(false);\n } catch (error) {\n // Do not swallow the failure into a silent no-op: surface it (the\n // caller's own error UI is the right place to react to it in detail)\n // and, critically, leave the dialog open instead of closing it as if\n // nothing happened.\n console.error(error);\n } finally {\n setPending(false);\n }\n };\n\n return (\n <Modal\n open={open}\n onOpenChange={onOpenChange}\n title={title}\n description={description}\n footer={\n <>\n <Button variant=\"outline\" onClick={handleCancel} disabled={pending} data-testid={cancelTestId}>\n {cancelLabel}\n </Button>\n <Button\n variant={variant === \"destructive\" ? \"destructive\" : \"default\"}\n onClick={handleConfirm}\n disabled={pending}\n data-testid={confirmTestId}\n >\n {pending ? `${confirmLabel}…` : confirmLabel}\n </Button>\n </>\n }\n >\n {null}\n </Modal>\n );\n};\n","import type { FormEvent, ReactElement, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport { Button } from \"../../primitives/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../../primitives/dialog\";\n\nexport interface FormModalProps {\n /** Whether the modal is open. Fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title. */\n title: string;\n /** Optional supporting copy shown under the title. */\n description?: string;\n /** Form field content, rendered inside the `<form>`. */\n children: ReactNode;\n /** Called on submit (button click or Enter in a field). May return a promise. */\n onSubmit: () => void | Promise<void>;\n /** Label for the submit button. Defaults to `\"Save\"`. */\n submitLabel?: string;\n /** Label for the cancel button. Defaults to `\"Cancel\"`. */\n cancelLabel?: string;\n /**\n * Disables the submit button (e.g. required fields still empty), on top of\n * the automatic disable while `onSubmit`'s promise is pending. Cancel\n * stays enabled either way. Defaults to `false`.\n */\n submitDisabled?: boolean;\n /** Extra classes applied to `DialogContent`, e.g. to override the default width. */\n className?: string;\n /** Forwarded to the submit button, for test targeting (e.g. Playwright/Testing Library). */\n submitTestId?: string;\n /** Forwarded to the cancel button, for test targeting. */\n cancelTestId?: string;\n}\n\n/**\n * Modal wrapping a form. Unlike `ConfirmDialog`, this does NOT close itself\n * after a successful `onSubmit` — forms commonly have server-side validation\n * and shouldn't vanish on failure, so closing after success is left entirely\n * to the caller (typically by calling `onOpenChange(false)` once its own\n * submit handler resolves without error).\n */\nexport const FormModal = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n onSubmit,\n submitLabel = \"Save\",\n cancelLabel = \"Cancel\",\n submitDisabled = false,\n className,\n submitTestId,\n cancelTestId,\n}: FormModalProps): ReactElement => {\n const [pending, setPending] = useState(false);\n\n const handleSubmit = async (event: FormEvent<HTMLFormElement>): Promise<void> => {\n event.preventDefault();\n setPending(true);\n try {\n await onSubmit();\n } finally {\n setPending(false);\n }\n };\n\n const handleCancel = (): void => {\n onOpenChange(false);\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className={className}>\n <form onSubmit={handleSubmit}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? <DialogDescription>{description}</DialogDescription> : null}\n </DialogHeader>\n {children}\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCancel}\n disabled={pending}\n data-testid={cancelTestId}\n >\n {cancelLabel}\n </Button>\n <Button type=\"submit\" disabled={pending || submitDisabled} data-testid={submitTestId}>\n {pending ? `${submitLabel}…` : submitLabel}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n );\n};\n","import type { ReactElement } from \"react\";\nimport { cloneElement, isValidElement, useId } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Label } from \"../../primitives/label\";\n\nexport interface FormFieldProps {\n /** Visible label text for the field. */\n label: string;\n /** Explicit id to associate the label with the child control. Auto-generated when omitted. */\n htmlFor?: string;\n /** Validation error text. When set, takes precedence over `description` and marks the child as invalid. */\n error?: string;\n /** Helper text shown below the child control when there's no `error`. */\n description?: string;\n /** Renders a visual \"required\" indicator next to the label. */\n required?: boolean;\n /** The single form control (e.g. `Input`, `Textarea`, `Select`) this field wraps. */\n children: ReactElement;\n /** Additional class names for the outer wrapper. */\n className?: string;\n}\n\n/**\n * Wraps a single form control with a `Label`, optional required indicator, and\n * either an `error` or `description` message — the \"label + input + error\"\n * pattern used throughout the consuming apps' forms.\n *\n * Handles id plumbing automatically: generates a stable id (via `useId`) for\n * the label/control pair unless `htmlFor` or the child's own `id` is set, and\n * wires up `aria-invalid` / `aria-describedby` so the error or description\n * text is announced by assistive tech.\n */\nexport function FormField({\n label,\n htmlFor,\n error,\n description,\n required,\n children,\n className,\n}: FormFieldProps): ReactElement {\n const generatedId = useId();\n const resolvedId = htmlFor ?? generatedId;\n const isSingleElement = isValidElement(children);\n const existingChildId = isSingleElement\n ? (children.props as { id?: string }).id\n : undefined;\n const effectiveId = existingChildId ?? resolvedId;\n\n const message = error ?? description;\n const messageId = message ? `${effectiveId}-message` : undefined;\n\n const child = isSingleElement\n ? cloneElement(\n children as ReactElement<{\n id?: string;\n \"aria-invalid\"?: boolean;\n \"aria-describedby\"?: string;\n }>,\n {\n id: effectiveId,\n ...(error ? { \"aria-invalid\": true } : {}),\n ...(messageId ? { \"aria-describedby\": messageId } : {}),\n },\n )\n : children;\n\n return (\n <div className={cn(\"flex flex-col gap-1.5\", className)}>\n <Label htmlFor={effectiveId}>\n {label}\n {required ? (\n <span className=\"text-destructive\" aria-hidden=\"true\">\n {\" \"}\n *\n </span>\n ) : null}\n </Label>\n {child}\n {error ? (\n <p id={messageId} className=\"text-sm text-destructive\">\n {error}\n </p>\n ) : description ? (\n <p id={messageId} className=\"text-sm text-muted-foreground\">\n {description}\n </p>\n ) : null}\n </div>\n );\n}\n","import { Check, ChevronsUpDown, X } from \"lucide-react\";\nimport type { ComponentProps, KeyboardEvent, ReactElement } from \"react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../primitives/button\";\nimport { Input } from \"../../primitives/input\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../primitives/popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n disabled?: boolean;\n /** Groups this option under a header with the given key, rendered as a bold label\n * (plus a tri-state \"select all\" checkbox in multi-select mode — see `groupLabels`\n * on the base props). Options sharing a `group` must be contiguous in `options` —\n * the component renders a header the first time a group key is seen and does not\n * re-sort the list, so interleaved groups would render more than one header for the\n * same key. Ungrouped options (no `group`) render individually, with no header. */\n group?: string;\n}\n\ninterface ComboboxBaseProps {\n /** The full option list. Filtering happens client-side against `label`. */\n options: ComboboxOption[];\n /** Trigger text shown when nothing is selected. Defaults to `\"Select…\"`. */\n placeholder?: string;\n /** Placeholder for the search input inside the popover. Defaults to `\"Search…\"`. */\n searchPlaceholder?: string;\n /** Shown when the search term matches nothing. Defaults to `\"No matches.\"`. */\n emptyMessage?: string;\n disabled?: boolean;\n /** Shows `loadingMessage` on the trigger instead of the placeholder/selection, and\n * disables the trigger and clear affordance alongside `disabled`. For a combobox whose\n * `options` are still being fetched. Defaults to `false`. */\n loading?: boolean;\n /** Trigger text shown while `loading` is true. Defaults to `\"Loading…\"`. */\n loadingMessage?: string;\n /** Shows a clear (\"x\") affordance on the trigger when a value is selected. Defaults to `true`. */\n clearable?: boolean;\n className?: string;\n id?: string;\n /** Forwarded to the trigger button, for test targeting (e.g. Playwright/Testing Library). */\n \"data-testid\"?: string;\n /** Display label for a group key (`ComboboxOption.group`). Falls back to the raw key\n * when an entry is missing. Only relevant when at least one option sets `group`. */\n groupLabels?: Record<string, string>;\n /** Portal target for the popover, forwarded to the underlying `PopoverContent`.\n * Needed when the combobox is opened from inside a modal Dialog/Sheet — pass the\n * Dialog/Sheet content element so the popover portals inside it instead of\n * `document.body`, which would otherwise fight with the Dialog's focus trap. */\n container?: ComponentProps<typeof PopoverContent>[\"container\"];\n /** Switches the search input to server-driven mode: called with the raw search\n * text on every keystroke (and with `\"\"` when the popover opens), and `options`\n * is rendered as-is instead of being filtered locally against `label`. Omit for\n * the default client-side filtering behavior. */\n onSearchChange?: (search: string) => void;\n /** Fallback trigger label used when the current selection's `value`(s) aren't\n * present in `options` — the case in server-driven search mode where the\n * selected option was found by an earlier query and isn't part of the current\n * result page. Ignored once a matching option is found in `options`. */\n selectedLabel?: string;\n}\n\nexport interface ComboboxSingleProps extends ComboboxBaseProps {\n /** Omitted or `false` for the (default) single-select shape below. */\n multiple?: false;\n /** Selected option's `value`, or `null`/`undefined` for no selection. */\n value?: string | null;\n /** Called with the newly selected option's `value`, or `null` when cleared. */\n onChange: (value: string | null) => void;\n}\n\nexport interface ComboboxMultiProps extends ComboboxBaseProps {\n /** `true` selects the multi-select shape below. */\n multiple: true;\n /** Selected options' `value`s. */\n value: string[];\n /** Called with the full updated selection after a toggle, or `[]` when cleared. */\n onChange: (value: string[]) => void;\n}\n\n/**\n * Discriminated on `multiple`: the default (omitted/`false`) shape is the\n * original single-select API, unchanged (`value: string | null`); passing\n * `multiple: true` switches to the array-valued shape (`value: string[]`).\n */\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultiProps;\n\nfunction groupMembers(options: ComboboxOption[], group: string): string[] {\n return options.filter((o) => o.group === group && !o.disabled).map((o) => o.value);\n}\n\ntype GroupCheckState = \"checked\" | \"unchecked\" | \"indeterminate\";\n\nfunction groupCheckState(options: ComboboxOption[], selectedValues: string[], group: string): GroupCheckState {\n const members = groupMembers(options, group);\n const selectedCount = members.filter((v) => selectedValues.includes(v)).length;\n if (selectedCount === 0) return \"unchecked\";\n return selectedCount === members.length ? \"checked\" : \"indeterminate\";\n}\n\n/** If the current multi-select selection is exactly one or more *fully* selected\n * groups and nothing else, returns those groups' labels joined by \", \" (e.g. \"Team A\"\n * or \"Team A, Team B\") — so picking a manager's whole team via its header checkbox\n * shows the team's name on the trigger instead of a bare \"6 selected\". A group\n * selected alongside anything it doesn't fully cover (a partial group, or a full\n * group plus an extra individual pick) returns `null`, falling back to the count. */\nfunction resolveGroupTriggerLabel(\n options: ComboboxOption[],\n selectedValues: string[],\n groupLabel: (group: string) => string,\n): string | null {\n const selectedSet = new Set(selectedValues);\n const groupsPresent = Array.from(\n new Set(options.filter((o) => selectedSet.has(o.value) && o.group).map((o) => o.group as string)),\n );\n if (groupsPresent.length === 0) return null;\n\n const coveredValues = new Set<string>();\n const fullyCoveredGroups: string[] = [];\n for (const group of groupsPresent) {\n const members = groupMembers(options, group);\n if (members.length > 0 && members.every((v) => selectedSet.has(v))) {\n fullyCoveredGroups.push(group);\n for (const v of members) coveredValues.add(v);\n }\n }\n const hasLeftover = selectedValues.some((v) => !coveredValues.has(v));\n if (fullyCoveredGroups.length === 0 || hasLeftover) return null;\n return fullyCoveredGroups.map(groupLabel).join(\", \");\n}\n\ninterface OptionRow {\n option: ComboboxOption;\n index: number;\n /** Set when this option starts a new group — i.e. it's the first (post-filter)\n * option carrying this `group` key. Render a header right before it. */\n headerGroup: string | undefined;\n}\n\n/** Decorates `visibleOptions` with where a group header belongs, in one linear pass —\n * kept separate from JSX so the render below is a plain `.map()` with no per-row\n * bookkeeping of its own. */\nfunction buildOptionRows(visibleOptions: ComboboxOption[]): OptionRow[] {\n let lastGroup: string | undefined;\n return visibleOptions.map((option, index) => {\n const headerGroup = option.group && option.group !== lastGroup ? option.group : undefined;\n lastGroup = option.group ?? lastGroup;\n return { option, index, headerGroup };\n });\n}\n\n/**\n * A searchable dropdown (\"autocomplete box\"), single- or multi-select\n * depending on the `multiple` prop: a button trigger showing the current\n * selection, opening a popover with a text filter above a scrollable option\n * list. Deliberately built on the existing `Popover` + `Input` primitives\n * rather than a `cmdk`-based `Command` component — this mirrors\n * `@bmsuisse/datagrid`'s `EnumFilter` (plain substring filter over a manually\n * rendered list), keeping the dependency footprint the same as the rest of\n * this package instead of introducing a new list/command library.\n */\nexport function Combobox(props: ComboboxProps): ReactElement {\n const {\n options,\n placeholder = \"Select…\",\n searchPlaceholder = \"Search…\",\n emptyMessage = \"No matches.\",\n disabled,\n loading = false,\n loadingMessage = \"Loading…\",\n clearable = true,\n className,\n id,\n groupLabels,\n container,\n onSearchChange,\n selectedLabel,\n } = props;\n const testId = props[\"data-testid\"];\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [activeIndex, setActiveIndex] = useState(0);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Normalize both modes to an array so the rest of the component (rendering,\n // active-index bookkeeping) doesn't need to branch on `multiple` at all —\n // only `selectOption` and the clear affordance need mode-specific behavior.\n const selectedValues = useMemo<string[]>(\n () => (props.multiple ? props.value : props.value ? [props.value] : []),\n [props.multiple, props.value],\n );\n\n const selectedOptions = useMemo(\n () => options.filter((option) => selectedValues.includes(option.value)),\n [options, selectedValues],\n );\n\n // In server-driven search mode (`onSearchChange` given), `options` is assumed\n // to already be the caller's current result set — filtering it again locally\n // against a possibly-stale `search` term would double-filter and could hide\n // options the server already matched on fields other than `label`.\n const visibleOptions = useMemo(() => {\n if (onSearchChange) return options;\n const term = search.trim().toLowerCase();\n if (!term) return options;\n return options.filter((option) => option.label.toLowerCase().includes(term));\n }, [options, search, onSearchChange]);\n\n // Reset the search box and re-point `activeIndex` at the current selection\n // each time the popover opens — intentionally NOT reactive to `options`/\n // `value` changes while it stays open, only to the open transition itself.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (!open) return;\n setSearch(\"\");\n onSearchChange?.(\"\");\n const firstSelected = selectedValues[0];\n const selectedIdx = firstSelected ? options.findIndex((option) => option.value === firstSelected) : -1;\n setActiveIndex(selectedIdx >= 0 ? selectedIdx : 0);\n inputRef.current?.focus();\n }, [open]);\n\n // Keep the active index in range as the visible list shrinks/grows while typing.\n useEffect(() => {\n setActiveIndex((i) => Math.min(i, Math.max(visibleOptions.length - 1, 0)));\n }, [visibleOptions.length]);\n\n function selectOption(option: ComboboxOption): void {\n if (option.disabled) return;\n if (props.multiple) {\n const next = props.value.includes(option.value)\n ? props.value.filter((v) => v !== option.value)\n : [...props.value, option.value];\n props.onChange(next);\n return; // multi-select stays open so the user can pick several\n }\n props.onChange(option.value);\n setOpen(false);\n }\n\n function handleKeyDown(event: KeyboardEvent<HTMLInputElement>): void {\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n setActiveIndex((i) => Math.min(i + 1, visibleOptions.length - 1));\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n setActiveIndex((i) => Math.max(i - 1, 0));\n } else if (event.key === \"Enter\") {\n event.preventDefault();\n const option = visibleOptions[activeIndex];\n if (option) selectOption(option);\n }\n }\n\n const groupLabel = (group: string): string => groupLabels?.[group] ?? group;\n\n function toggleGroup(group: string): void {\n if (!props.multiple) return;\n const members = groupMembers(options, group);\n const next =\n groupCheckState(options, selectedValues, group) === \"checked\"\n ? props.value.filter((v) => !members.includes(v))\n : Array.from(new Set([...props.value, ...members]));\n props.onChange(next);\n }\n\n // \"N selected\" once 2+ are picked (multi-select only — single-select never exceeds\n // 1); the single label at exactly 1; the placeholder at 0; a fully-selected group's\n // own label(s) in place of the count when that applies (see resolveGroupTriggerLabel).\n const triggerLabel = loading\n ? loadingMessage\n : selectedOptions.length === 0\n ? (selectedValues.length > 0 ? (selectedLabel ?? placeholder) : placeholder)\n : selectedOptions.length === 1\n ? (selectedOptions[0]?.label ?? placeholder)\n : (props.multiple ? resolveGroupTriggerLabel(options, selectedValues, groupLabel) : null) ??\n `${selectedOptions.length} selected`;\n\n const optionRows = useMemo(() => buildOptionRows(visibleOptions), [visibleOptions]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n id={id}\n data-testid={testId}\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled || loading}\n className={cn(\n \"w-full justify-between font-normal\",\n (selectedOptions.length === 0 || loading) && \"text-muted-foreground\",\n className,\n )}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <span className=\"flex items-center gap-1\">\n {clearable && !loading && selectedValues.length > 0 ? (\n <span\n role=\"button\"\n aria-label=\"Clear selection\"\n tabIndex={-1}\n className=\"rounded-sm p-0.5 opacity-60 hover:bg-accent hover:opacity-100\"\n onClick={(event) => {\n event.stopPropagation();\n if (props.multiple) {\n props.onChange([]);\n } else {\n props.onChange(null);\n }\n }}\n >\n <X className=\"h-3.5 w-3.5\" />\n </span>\n ) : null}\n <ChevronsUpDown className=\"h-4 w-4 shrink-0 opacity-50\" aria-hidden=\"true\" />\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n container={container}\n className=\"w-[var(--radix-popover-trigger-width)] min-w-[10rem] p-2\"\n onOpenAutoFocus={(event) => event.preventDefault()}\n >\n <div className=\"flex flex-col gap-2\">\n <Input\n ref={inputRef}\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n onSearchChange?.(event.target.value);\n }}\n onKeyDown={handleKeyDown}\n placeholder={searchPlaceholder}\n aria-label={searchPlaceholder}\n />\n <div role=\"listbox\" className=\"flex max-h-60 flex-col gap-0.5 overflow-y-auto\">\n {optionRows.length === 0 ? (\n <p className=\"py-2 text-center text-sm text-muted-foreground\">{emptyMessage}</p>\n ) : (\n optionRows.map(({ option, index, headerGroup }) => {\n const isSelected = selectedValues.includes(option.value);\n const isActive = index === activeIndex;\n const headerState = headerGroup ? groupCheckState(options, selectedValues, headerGroup) : undefined;\n return (\n <div key={option.value}>\n {headerGroup ? (\n <div\n data-group-header\n className=\"mt-1 flex items-center gap-2 rounded-sm bg-muted/50 px-2 py-1.5 text-sm font-semibold text-foreground first:mt-0\"\n >\n {props.multiple ? (\n <input\n type=\"checkbox\"\n checked={headerState === \"checked\"}\n ref={(el) => {\n if (el) el.indeterminate = headerState === \"indeterminate\";\n }}\n onChange={() => toggleGroup(headerGroup)}\n onClick={(event) => event.stopPropagation()}\n className=\"h-3.5 w-3.5 shrink-0 accent-primary\"\n aria-label={`Select all of ${groupLabel(headerGroup)}`}\n />\n ) : null}\n <span className=\"truncate\">{groupLabel(headerGroup)}</span>\n </div>\n ) : null}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={isSelected}\n disabled={option.disabled}\n data-testid={testId ? `${testId}-option` : undefined}\n data-option-value={option.value}\n onMouseEnter={() => setActiveIndex(index)}\n onClick={() => selectOption(option)}\n className={cn(\n \"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none disabled:pointer-events-none disabled:opacity-50\",\n isActive && \"bg-accent text-accent-foreground\",\n )}\n >\n {props.multiple ? (\n <input\n type=\"checkbox\"\n checked={isSelected}\n readOnly\n tabIndex={-1}\n className=\"pointer-events-none h-3.5 w-3.5 shrink-0 accent-primary\"\n />\n ) : (\n <Check className={cn(\"h-4 w-4 shrink-0\", isSelected ? \"opacity-100\" : \"opacity-0\")} />\n )}\n <span className=\"truncate\">{option.label}</span>\n </button>\n </div>\n );\n })\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n","import { AlertCircle, AlertTriangle, CheckCircle2, Info } from \"lucide-react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport type AlertBoxVariant = \"error\" | \"warning\" | \"info\" | \"success\";\n\nexport interface AlertBoxProps {\n /** Determines the color scheme and the default icon. */\n variant: AlertBoxVariant;\n /** Optional bold heading line shown above the body content. */\n title?: string;\n /** Body text/content. Always rendered. */\n children: ReactNode;\n className?: string;\n /**\n * Overrides the default variant icon entirely. Pass `null` to hide the\n * icon. Defaults to a variant-specific lucide-react icon.\n */\n icon?: ReactNode;\n}\n\n// `error` reuses the shared `destructive` theme token, matching the banner\n// pattern already used elsewhere. `warning`/`info`/`success` have no equivalent tokens\n// in @bmsuisse/ui's theme (it only defines background/foreground/primary/muted/\n// popover/accent/destructive/border/input/ring), so these three variants use\n// fixed Tailwind palette colors instead of theme tokens. A consumer app with\n// different brand colors will need to override these via `className`.\nconst variantStyles: Record<AlertBoxVariant, string> = {\n error: \"border-destructive bg-destructive/10 text-destructive\",\n warning: \"border-amber-500 bg-amber-500/10 text-amber-700 dark:text-amber-300\",\n info: \"border-sky-500 bg-sky-500/10 text-sky-700 dark:text-sky-300\",\n success: \"border-emerald-500 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300\",\n};\n\nconst defaultIcons: Record<AlertBoxVariant, ReactElement> = {\n error: <AlertCircle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n warning: <AlertTriangle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n info: <Info className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n success: <CheckCircle2 className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n};\n\nexport const AlertBox = ({ variant, title, children, className, icon }: AlertBoxProps): ReactElement => {\n const resolvedIcon = icon === undefined ? defaultIcons[variant] : icon;\n\n return (\n <div className={cn(\"rounded-md border p-3 text-sm\", variantStyles[variant], className)}>\n <div className=\"flex flex-row items-start gap-2\">\n {resolvedIcon != null && <span className=\"mt-0.5 shrink-0\">{resolvedIcon}</span>}\n <div className=\"flex flex-col gap-1\">\n {title && <p className=\"font-bold\">{title}</p>}\n <div>{children}</div>\n </div>\n </div>\n </div>\n );\n};\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Badge } from \"../../primitives/badge\";\n\n/** Semantic color intent for a {@link StatusBadge}. */\nexport type StatusTone = \"success\" | \"warning\" | \"error\" | \"info\" | \"neutral\";\n\n/**\n * Class names per tone. `success` / `warning` / `info` fall back to fixed\n * Tailwind palette shades (with `dark:` variants, since this package's dark\n * mode is a `.dark` ancestor class) because the shared theme currently only\n * defines background/foreground/primary/muted/popover/accent/destructive/\n * border/input/ring tokens — no warning/info/success tokens exist yet, same\n * reasoning AlertBox uses for those tones. `error` and `neutral` instead\n * reuse the existing `destructive` and `muted` theme tokens directly.\n */\nconst TONE_CLASSES: Record<StatusTone, string> = {\n success: \"border-transparent bg-emerald-500/15 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300\",\n warning: \"border-transparent bg-amber-500/15 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300\",\n info: \"border-transparent bg-sky-500/15 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300\",\n error: \"border-transparent bg-destructive/15 text-destructive\",\n neutral: \"border-transparent bg-muted text-muted-foreground\",\n};\n\n/** Built-in status vocabulary, matched case-insensitively against `status.toLowerCase()`. */\nconst DEFAULT_TONE_MAP: Record<string, StatusTone> = {\n active: \"success\",\n approved: \"success\",\n completed: \"success\",\n paid: \"success\",\n done: \"success\",\n pending: \"warning\",\n draft: \"warning\",\n in_review: \"warning\",\n inreview: \"warning\",\n rejected: \"error\",\n failed: \"error\",\n cancelled: \"error\",\n canceled: \"error\",\n overdue: \"error\",\n inactive: \"neutral\",\n archived: \"neutral\",\n new: \"info\",\n};\n\n/** Title-cases a raw status value and replaces underscores/hyphens with spaces, e.g. `\"in_review\"` -> `\"In Review\"`. */\nfunction deriveLabel(status: string): string {\n return status\n .replace(/[_-]+/g, \" \")\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n}\n\n/**\n * Resolves a status to a {@link StatusTone}.\n *\n * Resolution order: explicit `tone` prop > caller's `toneMap` (case-insensitive\n * key match) > built-in default map (case-insensitive) > `neutral` fallback.\n */\nfunction resolveTone(status: string, tone?: StatusTone, toneMap?: Record<string, StatusTone>): StatusTone {\n if (tone) {\n return tone;\n }\n\n const key = status.toLowerCase();\n\n if (toneMap) {\n for (const [candidate, candidateTone] of Object.entries(toneMap)) {\n if (candidate.toLowerCase() === key) {\n return candidateTone;\n }\n }\n }\n\n return DEFAULT_TONE_MAP[key] ?? \"neutral\";\n}\n\nexport interface StatusBadgeProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Raw status value from the caller's domain, e.g. `\"pending\"`, `\"APPROVED\"`, `\"in_review\"`. */\n status: string;\n /** Overrides the displayed text. Defaults to a title-cased, space-separated derivation of `status`. */\n label?: string;\n /** Explicit tone override. When provided, `toneMap` and the built-in default map are skipped entirely. */\n tone?: StatusTone;\n /** Caller-supplied status-to-tone mapping (case-insensitive keys), checked before the built-in default map. */\n toneMap?: Record<string, StatusTone>;\n}\n\n/**\n * A status-to-color badge, built on the shared `Badge` primitive.\n *\n * Centralizes the status->color mapping that's otherwise reimplemented ad hoc\n * per app: callers can rely on the built-in English status vocabulary, supply\n * their own `toneMap` for domain-specific statuses, or force a `tone`\n * outright.\n */\nexport const StatusBadge = ({ status, label, tone, toneMap, className, ...props }: StatusBadgeProps): ReactElement => {\n const resolvedTone = resolveTone(status, tone, toneMap);\n const displayLabel = label ?? deriveLabel(status);\n\n return (\n <Badge variant=\"outline\" className={cn(TONE_CLASSES[resolvedTone], className)} {...props}>\n {displayLabel}\n </Badge>\n );\n};\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Loader2 } from \"lucide-react\";\nimport type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const loadingSpinnerIconVariants = cva(\"animate-spin text-muted-foreground\", {\n variants: {\n size: {\n sm: \"h-3.5 w-3.5\",\n default: \"h-4 w-4\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n});\n\nexport interface LoadingSpinnerProps\n extends HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof loadingSpinnerIconVariants> {\n /** Optional text rendered next to the spinner. Omitted entirely renders an icon-only spinner. */\n label?: string;\n}\n\n/** Inline loading indicator: a spinning icon with an optional label, e.g. `<LoadingSpinner label=\"Saving…\" />`. */\nexport const LoadingSpinner = ({\n size,\n label,\n className,\n ...props\n}: LoadingSpinnerProps): ReactElement => (\n <span role=\"status\" className={cn(\"inline-flex items-center gap-2\", className)} {...props}>\n <Loader2 className={cn(loadingSpinnerIconVariants({ size }))} aria-hidden=\"true\" />\n {label ? <span>{label}</span> : null}\n </span>\n);\n\nexport interface LoadingOverlayProps\n extends HTMLAttributes<HTMLDivElement>,\n Pick<LoadingSpinnerProps, \"label\"> {\n size?: LoadingSpinnerProps[\"size\"];\n}\n\n/** Centers a larger `LoadingSpinner` inside a full container/page — use as a route or panel loading state. */\nexport const LoadingOverlay = ({\n size = \"lg\",\n label,\n className,\n ...props\n}: LoadingOverlayProps): ReactElement => (\n <div\n className={cn(\"flex h-full min-h-32 w-full items-center justify-center\", className)}\n {...props}\n >\n <LoadingSpinner size={size} label={label} />\n </div>\n);\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAA4B,WAAW;AAEvC,SAAS,kBAAkB;;;ACH3B,SAA0B,YAAY;AACtC,SAAS,eAAe;AAGjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADiDM;AAjDC,IAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,QACP,aAAa;AAAA,QACb,WAAW;AAAA,QACX,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMN,iBACE;AAAA,QACF,mBACE;AAAA,MACJ;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,I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MACT,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAUM,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,gBAAAD,OAAC,UAAK,MAAK,UAAS,WAAW,GAAG,kCAAkC,SAAS,GAAI,GAAG,OAClF;AAAA,kBAAAD,MAAC,WAAQ,WAAW,GAAG,2BAA2B,EAAE,KAAK,CAAC,CAAC,GAAG,eAAY,QAAO;AAAA,EAChF,QAAQ,gBAAAA,MAAC,UAAM,iBAAM,IAAU;AAAA,GAClC;AAUK,IAAM,iBAAiB,CAAC;AAAA,EAC7B,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,gBAAAA;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,2DAA2D,SAAS;AAAA,IACjF,GAAG;AAAA,IAEJ,0BAAAA,MAAC,kBAAe,MAAY,OAAc;AAAA;AAC5C;","names":["forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","jsx","cva","jsx","cva","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","jsxs","forwardRef","jsx","Check","forwardRef","jsx","forwardRef","Check","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","jsxs","forwardRef","forwardRef","jsx","forwardRef","Check","forwardRef","jsx","jsxs","forwardRef","Check","cva","DialogPrimitive","X","forwardRef","jsx","jsxs","forwardRef","cva","X","forwardRef","jsx","forwardRef","jsx","jsxs","jsx","jsxs","useState","jsx","jsxs","useState","jsx","jsxs","Check","X","useState","jsx","jsxs","useState","X","Check","jsx","jsxs","jsx","cva","jsx","jsxs","cva"]}
|
|
1
|
+
{"version":3,"sources":["../src/primitives/button.tsx","../src/lib/utils.ts","../src/primitives/input.tsx","../src/primitives/label.tsx","../src/primitives/textarea.tsx","../src/primitives/card.tsx","../src/primitives/badge.tsx","../src/primitives/dialog.tsx","../src/primitives/popover.tsx","../src/primitives/select.tsx","../src/primitives/skeleton.tsx","../src/primitives/checkbox.tsx","../src/primitives/switch.tsx","../src/primitives/tabs.tsx","../src/primitives/separator.tsx","../src/primitives/scroll-area.tsx","../src/primitives/table.tsx","../src/primitives/dropdown-menu.tsx","../src/primitives/sheet.tsx","../src/primitives/tooltip.tsx","../src/patterns/modal/Modal.tsx","../src/patterns/modal/ConfirmDialog.tsx","../src/patterns/modal/FormModal.tsx","../src/patterns/form-field/FormField.tsx","../src/patterns/combobox/Combobox.tsx","../src/patterns/alert-box/AlertBox.tsx","../src/patterns/status-badge/StatusBadge.tsx","../src/patterns/loading-spinner/LoadingSpinner.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n secondary: \"bg-muted text-muted-foreground hover:bg-muted/80\",\n link: \"text-primary underline-offset-4 hover:underline\",\n // \"Swiss design\" red CTA, ported from akeneo_editor's old .btn-primary-swiss\n // naive-ui override. Relies on --color-swiss-primary/-hover and\n // --color-swiss-primary-foreground tokens defined by the consuming app's own\n // Tailwind theme (this package doesn't define them) — same pattern as AlertBox's\n // warning/info/success colors, which assume tokens the shared theme doesn't have.\n \"swiss-primary\":\n \"bg-swiss-primary text-swiss-primary-foreground font-semibold shadow-sm hover:bg-swiss-primary-hover hover:-translate-y-px active:translate-y-px\",\n \"swiss-secondary\":\n \"border border-input bg-background font-semibold text-foreground shadow-sm hover:bg-accent hover:-translate-y-px active:translate-y-px\",\n },\n size: {\n default: \"h-9 px-3\",\n xs: \"h-7 px-2 text-xs\",\n sm: \"h-8 px-2 text-xs\",\n lg: \"h-10 px-4\",\n icon: \"h-9 w-9\",\n \"icon-xs\": \"h-7 w-7\",\n \"icon-sm\": \"h-8 w-8\",\n \"icon-lg\": \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n },\n);\nButton.displayName = \"Button\";\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/** Merges conditional class names, then dedupes conflicting Tailwind utility classes. */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import type { InputHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport type InputProps = InputHTMLAttributes<HTMLInputElement>;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n});\nInput.displayName = \"Input\";\n","import type { LabelHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Label = forwardRef<HTMLLabelElement, LabelHTMLAttributes<HTMLLabelElement>>(\n ({ className, ...props }, ref) => (\n <label\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className,\n )}\n {...props}\n />\n ),\n);\nLabel.displayName = \"Label\";\n","import type { TextareaHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, ...props }, ref) => (\n <textarea\n className={cn(\n \"flex min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n ref={ref}\n {...props}\n />\n ),\n);\nTextarea.displayName = \"Textarea\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\n// Deliberately uses bg-background/text-foreground rather than shadcn's usual\n// bg-card/text-card-foreground tokens: the reference consumer app's actual\n// token set (which this package's demo/theme mirrors) has no --card token,\n// and adding one just for this component would be a second, redundant\n// \"surface\" token to keep in sync.\nexport const Card = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"rounded-lg border bg-background text-foreground shadow-sm\", className)} {...props} />\n);\n\nexport const CardHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5 p-6\", className)} {...props} />\n);\n\nexport const CardTitle = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)} {...props} />\n);\n\nexport const CardDescription = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n);\n\nexport const CardContent = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => <div className={cn(\"p-6 pt-0\", className)} {...props} />;\n\nexport const CardFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex items-center gap-2 p-6 pt-0\", className)} {...props} />\n);\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground\",\n secondary: \"border-transparent bg-muted text-muted-foreground\",\n destructive: \"border-transparent bg-destructive text-destructive-foreground\",\n outline: \"border-input text-foreground\",\n // Amber warning tone — same fixed-palette choice as AlertBox/StatusBadge's\n // warning tone, since the shared theme has no warning token yet.\n warning: \"border-transparent bg-amber-100 text-amber-900 dark:bg-amber-900/40 dark:text-amber-200\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nexport const Badge = ({ className, variant, ...props }: BadgeProps): ReactElement => (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n);\n","import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n\nexport const DialogOverlay = forwardRef<\n ElementRef<typeof DialogPrimitive.Overlay>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/50\", className)}\n {...props}\n />\n));\nDialogOverlay.displayName = \"DialogOverlay\";\n\nexport const DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n /** data-testid for the built-in header close button, since it renders no DOM a caller controls directly. */\n closeButtonTestId?: string;\n }\n>(({ className, children, showCloseButton = true, closeButtonTestId, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-full max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-lg border bg-background p-6 shadow-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton ? (\n <DialogPrimitive.Close\n data-testid={closeButtonTestId}\n className=\"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n));\nDialogContent.displayName = \"DialogContent\";\n\nexport const DialogHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5\", className)} {...props} />\n);\n\nexport const DialogTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold\", className)} {...props} />\n));\nDialogTitle.displayName = \"DialogTitle\";\n\nexport const DialogDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = \"DialogDescription\";\n\nexport const DialogFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex justify-end gap-2\", className)} {...props} />\n);\n","import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\nexport const PopoverContent = forwardRef<\n ElementRef<typeof PopoverPrimitive.Content>,\n ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n /** Portal target for the popover content. Defaults to `document.body` (Radix's\n * own default) when omitted. Needed when the popover is opened from inside a\n * modal Dialog/Sheet: Radix's Dialog `FocusScope` traps focus within its own\n * content subtree, and a popover portaled to `document.body` sits outside that\n * subtree — so pass the Dialog/Sheet content element here to portal into it\n * instead. */\n container?: ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>[\"container\"];\n }\n>(({ className, align = \"start\", sideOffset = 4, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = \"PopoverContent\";\n","import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Select = SelectPrimitive.Root;\nexport const SelectGroup = SelectPrimitive.Group;\nexport const SelectValue = SelectPrimitive.Value;\n\nexport interface SelectTriggerProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n size?: \"sm\" | \"default\";\n}\n\nexport const SelectTrigger = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n ({ className, children, size = \"default\", ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n size === \"sm\" ? \"h-8\" : \"h-9\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n ),\n);\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport const SelectContent = forwardRef<\n ElementRef<typeof SelectPrimitive.Content>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n position === \"popper\" && \"translate-y-1\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className=\"p-1\">{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = \"SelectContent\";\n\nexport const SelectItem = forwardRef<\n ElementRef<typeof SelectPrimitive.Item>,\n ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = \"SelectItem\";\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Skeleton = ({ className, ...props }: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"animate-pulse rounded-md bg-muted\", className)} {...props} />\n);\n","import * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Checkbox = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-input shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"h-3.5 w-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = \"Checkbox\";\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport interface SwitchProps extends ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {\n size?: \"sm\" | \"default\";\n}\n\nexport const Switch = forwardRef<ElementRef<typeof SwitchPrimitive.Root>, SwitchProps>(\n ({ className, size = \"default\", ...props }, ref) => (\n <SwitchPrimitive.Root\n ref={ref}\n className={cn(\n \"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n size === \"sm\" ? \"h-3.5 w-6\" : \"h-5 w-9\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0\",\n size === \"sm\"\n ? \"h-3 w-3 data-[state=checked]:translate-x-2.5\"\n : \"h-4 w-4 data-[state=checked]:translate-x-4\",\n )}\n />\n </SwitchPrimitive.Root>\n ),\n);\nSwitch.displayName = \"Switch\";\n","import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport const TabsList = forwardRef<\n ElementRef<typeof TabsPrimitive.List>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-9 w-fit items-center justify-center rounded-lg bg-muted p-[3px] text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\nTabsList.displayName = \"TabsList\";\n\nexport const TabsTrigger = forwardRef<\n ElementRef<typeof TabsPrimitive.Trigger>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium text-foreground/60 transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className,\n )}\n {...props}\n />\n));\nTabsTrigger.displayName = \"TabsTrigger\";\n\nexport const TabsContent = forwardRef<\n ElementRef<typeof TabsPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content ref={ref} className={cn(\"flex-1 outline-none\", className)} {...props} />\n));\nTabsContent.displayName = \"TabsContent\";\n","import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Separator = forwardRef<\n ElementRef<typeof SeparatorPrimitive.Root>,\n ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className,\n )}\n {...props}\n />\n));\nSeparator.displayName = \"Separator\";\n","import * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const ScrollBar = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n \"flex touch-none select-none transition-colors\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-border\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = \"ScrollBar\";\n\nexport const ScrollArea = forwardRef<\n ElementRef<typeof ScrollAreaPrimitive.Root>,\n ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn(\"relative overflow-hidden\", className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = \"ScrollArea\";\n","import type { HTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Table = forwardRef<HTMLTableElement, HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-x-auto\">\n <table ref={ref} className={cn(\"w-full caption-bottom text-sm\", className)} {...props} />\n </div>\n ),\n);\nTable.displayName = \"Table\";\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n ),\n);\nTableHeader.displayName = \"TableHeader\";\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(\"[&_tr:last-child]:border-0\", className)} {...props} />\n ),\n);\nTableBody.displayName = \"TableBody\";\n\nexport const TableFooter = forwardRef<HTMLTableSectionElement, HTMLAttributes<HTMLTableSectionElement>>(\n ({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n {...props}\n />\n ),\n);\nTableFooter.displayName = \"TableFooter\";\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\", className)}\n {...props}\n />\n ),\n);\nTableRow.displayName = \"TableRow\";\n\nexport const TableHead = forwardRef<HTMLTableCellElement, ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:pr-0\",\n className,\n )}\n {...props}\n />\n ),\n);\nTableHead.displayName = \"TableHead\";\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\"whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n {...props}\n />\n ),\n);\nTableCell.displayName = \"TableCell\";\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, HTMLAttributes<HTMLTableCaptionElement>>(\n ({ className, ...props }, ref) => (\n <caption ref={ref} className={cn(\"mt-4 text-sm text-muted-foreground\", className)} {...props} />\n ),\n);\nTableCaption.displayName = \"TableCaption\";\n","import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nexport const DropdownMenuItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Item>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { danger?: boolean }\n>(({ className, danger, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n danger && \"text-destructive focus:bg-destructive/10 focus:text-destructive\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nexport const DropdownMenuCheckboxItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\nexport const DropdownMenuRadioItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nexport const DropdownMenuSeparator = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Separator>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nexport const DropdownMenuLabel = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Label>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-xs font-medium text-muted-foreground\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nexport const DropdownMenuShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\n);\n\nexport const DropdownMenuSubTrigger = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nexport const DropdownMenuSubContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const Sheet = DialogPrimitive.Root;\nexport const SheetTrigger = DialogPrimitive.Trigger;\nexport const SheetClose = DialogPrimitive.Close;\nexport const SheetPortal = DialogPrimitive.Portal;\n\nexport const SheetOverlay = forwardRef<\n ElementRef<typeof DialogPrimitive.Overlay>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/50\", className)}\n {...props}\n />\n));\nSheetOverlay.displayName = \"SheetOverlay\";\n\n// Neither this package nor any other package in the monorepo depends on the\n// `tailwindcss-animate` plugin (grepped for \"animate-in\"/\"tailwindcss-animate\"\n// across the repo — the only pre-existing `data-[state=...]` usages are plain\n// color/background toggles, not that plugin's enter/exit keyframe utilities).\n// Rather than have @bmsuisse/ui silently assume a consumer has that plugin\n// installed, the slide transition here is done with Tailwind's built-in\n// `transition-transform` plus a `translate-x`/`translate-y` toggle driven off\n// Radix's own `data-[state=open]`/`data-[state=closed]` attributes.\nexport const sheetVariants = cva(\n \"fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out\",\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm\",\n },\n },\n defaultVariants: {\n side: \"right\",\n },\n },\n);\n\nexport interface SheetContentProps\n extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof sheetVariants> {}\n\nexport const SheetContent = forwardRef<ElementRef<typeof DialogPrimitive.Content>, SheetContentProps>(\n ({ side = \"right\", className, children, ...props }, ref) => (\n <SheetPortal>\n <SheetOverlay />\n <DialogPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </SheetPortal>\n ),\n);\nSheetContent.displayName = \"SheetContent\";\n\nexport const SheetHeader = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex flex-col gap-1.5\", className)} {...props} />\n);\n\nexport const SheetFooter = ({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>): ReactElement => (\n <div className={cn(\"flex justify-end gap-2\", className)} {...props} />\n);\n\nexport const SheetTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn(\"text-lg font-semibold\", className)} {...props} />\n));\nSheetTitle.displayName = \"SheetTitle\";\n\nexport const SheetDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nSheetDescription.displayName = \"SheetDescription\";\n","import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md\",\n className,\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = \"TooltipContent\";\n","import type { ReactElement, ReactNode } from \"react\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../../primitives/dialog\";\n\nexport interface ModalProps {\n /** Whether the modal is open. Modal is fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title, rendered in `DialogTitle`. */\n title: string;\n /** Optional supporting copy, rendered in `DialogDescription` under the title. */\n description?: string;\n /** Body content of the modal. */\n children: ReactNode;\n /** Optional footer content (typically action buttons), rendered in `DialogFooter`. */\n footer?: ReactNode;\n /** Extra classes applied to `DialogContent`, e.g. to override the default width. */\n className?: string;\n}\n\n/**\n * Base structural wrapper around the `@bmsuisse/ui` Dialog primitives: title,\n * optional description, body, and an optional footer. Use this directly for\n * modals that don't fit `ConfirmDialog` or `FormModal`; those two are built\n * on top of the same shape.\n */\nexport const Modal = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n footer,\n className,\n}: ModalProps): ReactElement => (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className={className}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? <DialogDescription>{description}</DialogDescription> : null}\n </DialogHeader>\n {children}\n {footer ? <DialogFooter>{footer}</DialogFooter> : null}\n </DialogContent>\n </Dialog>\n);\n","import type { ReactElement } from \"react\";\nimport { useState } from \"react\";\nimport { Button } from \"../../primitives/button\";\nimport { Modal } from \"./Modal\";\n\nexport interface ConfirmDialogProps {\n /** Whether the dialog is open. Fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title. */\n title: string;\n /** Optional supporting copy shown under the title. */\n description?: string;\n /** Label for the confirm button. Defaults to `\"Confirm\"`. */\n confirmLabel?: string;\n /** Label for the cancel button. Defaults to `\"Cancel\"`. */\n cancelLabel?: string;\n /** Called when the user clicks confirm. May return a promise; the dialog waits for it. */\n onConfirm: () => void | Promise<void>;\n /** Visual style of the confirm button. Defaults to `\"default\"`. */\n variant?: \"default\" | \"destructive\";\n /** Forwarded to the confirm button, for test targeting (e.g. Playwright/Testing Library). */\n confirmTestId?: string;\n /** Forwarded to the cancel button, for test targeting. */\n cancelTestId?: string;\n}\n\n/**\n * \"Are you sure?\" confirmation dialog. Unlike `FormModal`, this DOES close\n * itself automatically after a successful `onConfirm` — confirmations are a\n * single yes/no action with no follow-up state to inspect, so there's nothing\n * for the caller to decide. If `onConfirm` throws/rejects, the dialog stays\n * open and the error is not swallowed, so a caller can surface its own error\n * UI without the dialog disappearing out from under it.\n */\nexport const ConfirmDialog = ({\n open,\n onOpenChange,\n title,\n description,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n onConfirm,\n variant = \"default\",\n confirmTestId,\n cancelTestId,\n}: ConfirmDialogProps): ReactElement => {\n const [pending, setPending] = useState(false);\n\n const handleCancel = (): void => {\n onOpenChange(false);\n };\n\n const handleConfirm = async (): Promise<void> => {\n setPending(true);\n try {\n await onConfirm();\n onOpenChange(false);\n } catch (error) {\n // Do not swallow the failure into a silent no-op: surface it (the\n // caller's own error UI is the right place to react to it in detail)\n // and, critically, leave the dialog open instead of closing it as if\n // nothing happened.\n console.error(error);\n } finally {\n setPending(false);\n }\n };\n\n return (\n <Modal\n open={open}\n onOpenChange={onOpenChange}\n title={title}\n description={description}\n footer={\n <>\n <Button variant=\"outline\" onClick={handleCancel} disabled={pending} data-testid={cancelTestId}>\n {cancelLabel}\n </Button>\n <Button\n variant={variant === \"destructive\" ? \"destructive\" : \"default\"}\n onClick={handleConfirm}\n disabled={pending}\n data-testid={confirmTestId}\n >\n {pending ? `${confirmLabel}…` : confirmLabel}\n </Button>\n </>\n }\n >\n {null}\n </Modal>\n );\n};\n","import type { FormEvent, ReactElement, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport { Button } from \"../../primitives/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../../primitives/dialog\";\n\nexport interface FormModalProps {\n /** Whether the modal is open. Fully controlled — no internal open state. */\n open: boolean;\n /** Called when Radix wants to change the open state (backdrop click, Esc, close button). */\n onOpenChange: (open: boolean) => void;\n /** Dialog title. */\n title: string;\n /** Optional supporting copy shown under the title. */\n description?: string;\n /** Form field content, rendered inside the `<form>`. */\n children: ReactNode;\n /** Called on submit (button click or Enter in a field). May return a promise. */\n onSubmit: () => void | Promise<void>;\n /** Label for the submit button. Defaults to `\"Save\"`. */\n submitLabel?: string;\n /** Label for the cancel button. Defaults to `\"Cancel\"`. */\n cancelLabel?: string;\n /**\n * Disables the submit button (e.g. required fields still empty), on top of\n * the automatic disable while `onSubmit`'s promise is pending. Cancel\n * stays enabled either way. Defaults to `false`.\n */\n submitDisabled?: boolean;\n /** Extra classes applied to `DialogContent`, e.g. to override the default width. */\n className?: string;\n /** Forwarded to the submit button, for test targeting (e.g. Playwright/Testing Library). */\n submitTestId?: string;\n /** Forwarded to the cancel button, for test targeting. */\n cancelTestId?: string;\n}\n\n/**\n * Modal wrapping a form. Unlike `ConfirmDialog`, this does NOT close itself\n * after a successful `onSubmit` — forms commonly have server-side validation\n * and shouldn't vanish on failure, so closing after success is left entirely\n * to the caller (typically by calling `onOpenChange(false)` once its own\n * submit handler resolves without error).\n */\nexport const FormModal = ({\n open,\n onOpenChange,\n title,\n description,\n children,\n onSubmit,\n submitLabel = \"Save\",\n cancelLabel = \"Cancel\",\n submitDisabled = false,\n className,\n submitTestId,\n cancelTestId,\n}: FormModalProps): ReactElement => {\n const [pending, setPending] = useState(false);\n\n const handleSubmit = async (event: FormEvent<HTMLFormElement>): Promise<void> => {\n event.preventDefault();\n setPending(true);\n try {\n await onSubmit();\n } finally {\n setPending(false);\n }\n };\n\n const handleCancel = (): void => {\n onOpenChange(false);\n };\n\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogContent className={className}>\n <form onSubmit={handleSubmit}>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n {description ? <DialogDescription>{description}</DialogDescription> : null}\n </DialogHeader>\n {children}\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={handleCancel}\n disabled={pending}\n data-testid={cancelTestId}\n >\n {cancelLabel}\n </Button>\n <Button type=\"submit\" disabled={pending || submitDisabled} data-testid={submitTestId}>\n {pending ? `${submitLabel}…` : submitLabel}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n );\n};\n","import type { ReactElement } from \"react\";\nimport { cloneElement, isValidElement, useId } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Label } from \"../../primitives/label\";\n\nexport interface FormFieldProps {\n /** Visible label text for the field. */\n label: string;\n /** Explicit id to associate the label with the child control. Auto-generated when omitted. */\n htmlFor?: string;\n /** Validation error text. When set, takes precedence over `description` and marks the child as invalid. */\n error?: string;\n /** Helper text shown below the child control when there's no `error`. */\n description?: string;\n /** Renders a visual \"required\" indicator next to the label. */\n required?: boolean;\n /** The single form control (e.g. `Input`, `Textarea`, `Select`) this field wraps. */\n children: ReactElement;\n /** Additional class names for the outer wrapper. */\n className?: string;\n}\n\n/**\n * Wraps a single form control with a `Label`, optional required indicator, and\n * either an `error` or `description` message — the \"label + input + error\"\n * pattern used throughout the consuming apps' forms.\n *\n * Handles id plumbing automatically: generates a stable id (via `useId`) for\n * the label/control pair unless `htmlFor` or the child's own `id` is set, and\n * wires up `aria-invalid` / `aria-describedby` so the error or description\n * text is announced by assistive tech.\n */\nexport function FormField({\n label,\n htmlFor,\n error,\n description,\n required,\n children,\n className,\n}: FormFieldProps): ReactElement {\n const generatedId = useId();\n const resolvedId = htmlFor ?? generatedId;\n const isSingleElement = isValidElement(children);\n const existingChildId = isSingleElement\n ? (children.props as { id?: string }).id\n : undefined;\n const effectiveId = existingChildId ?? resolvedId;\n\n const message = error ?? description;\n const messageId = message ? `${effectiveId}-message` : undefined;\n\n const child = isSingleElement\n ? cloneElement(\n children as ReactElement<{\n id?: string;\n \"aria-invalid\"?: boolean;\n \"aria-describedby\"?: string;\n }>,\n {\n id: effectiveId,\n ...(error ? { \"aria-invalid\": true } : {}),\n ...(messageId ? { \"aria-describedby\": messageId } : {}),\n },\n )\n : children;\n\n return (\n <div className={cn(\"flex flex-col gap-1.5\", className)}>\n <Label htmlFor={effectiveId}>\n {label}\n {required ? (\n <span className=\"text-destructive\" aria-hidden=\"true\">\n {\" \"}\n *\n </span>\n ) : null}\n </Label>\n {child}\n {error ? (\n <p id={messageId} className=\"text-sm text-destructive\">\n {error}\n </p>\n ) : description ? (\n <p id={messageId} className=\"text-sm text-muted-foreground\">\n {description}\n </p>\n ) : null}\n </div>\n );\n}\n","import { Check, ChevronsUpDown, X } from \"lucide-react\";\nimport type { ComponentProps, KeyboardEvent, ReactElement } from \"react\";\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../primitives/button\";\nimport { Input } from \"../../primitives/input\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../../primitives/popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n disabled?: boolean;\n /** Groups this option under a header with the given key, rendered as a bold label\n * (plus a tri-state \"select all\" checkbox in multi-select mode — see `groupLabels`\n * on the base props). Options sharing a `group` must be contiguous in `options` —\n * the component renders a header the first time a group key is seen and does not\n * re-sort the list, so interleaved groups would render more than one header for the\n * same key. Ungrouped options (no `group`) render individually, with no header. */\n group?: string;\n}\n\ninterface ComboboxBaseProps {\n /** The full option list. Filtering happens client-side against `label`. */\n options: ComboboxOption[];\n /** Trigger text shown when nothing is selected. Defaults to `\"Select…\"`. */\n placeholder?: string;\n /** Placeholder for the search input inside the popover. Defaults to `\"Search…\"`. */\n searchPlaceholder?: string;\n /** Shown when the search term matches nothing. Defaults to `\"No matches.\"`. */\n emptyMessage?: string;\n disabled?: boolean;\n /** Shows `loadingMessage` on the trigger instead of the placeholder/selection, and\n * disables the trigger and clear affordance alongside `disabled`. For a combobox whose\n * `options` are still being fetched. Defaults to `false`. */\n loading?: boolean;\n /** Trigger text shown while `loading` is true. Defaults to `\"Loading…\"`. */\n loadingMessage?: string;\n /** Shows a clear (\"x\") affordance on the trigger when a value is selected. Defaults to `true`. */\n clearable?: boolean;\n className?: string;\n id?: string;\n /** Forwarded to the trigger button, for test targeting (e.g. Playwright/Testing Library). */\n \"data-testid\"?: string;\n /** Display label for a group key (`ComboboxOption.group`). Falls back to the raw key\n * when an entry is missing. Only relevant when at least one option sets `group`. */\n groupLabels?: Record<string, string>;\n /** Portal target for the popover, forwarded to the underlying `PopoverContent`.\n * Needed when the combobox is opened from inside a modal Dialog/Sheet — pass the\n * Dialog/Sheet content element so the popover portals inside it instead of\n * `document.body`, which would otherwise fight with the Dialog's focus trap. */\n container?: ComponentProps<typeof PopoverContent>[\"container\"];\n /** Switches the search input to server-driven mode: called with the raw search\n * text on every keystroke (and with `\"\"` when the popover opens), and `options`\n * is rendered as-is instead of being filtered locally against `label`. Omit for\n * the default client-side filtering behavior. */\n onSearchChange?: (search: string) => void;\n /** Fallback trigger label used when the current selection's `value`(s) aren't\n * present in `options` — the case in server-driven search mode where the\n * selected option was found by an earlier query and isn't part of the current\n * result page. Ignored once a matching option is found in `options`. */\n selectedLabel?: string;\n}\n\nexport interface ComboboxSingleProps extends ComboboxBaseProps {\n /** Omitted or `false` for the (default) single-select shape below. */\n multiple?: false;\n /** Selected option's `value`, or `null`/`undefined` for no selection. */\n value?: string | null;\n /** Called with the newly selected option's `value`, or `null` when cleared. */\n onChange: (value: string | null) => void;\n}\n\nexport interface ComboboxMultiProps extends ComboboxBaseProps {\n /** `true` selects the multi-select shape below. */\n multiple: true;\n /** Selected options' `value`s. */\n value: string[];\n /** Called with the full updated selection after a toggle, or `[]` when cleared. */\n onChange: (value: string[]) => void;\n}\n\n/**\n * Discriminated on `multiple`: the default (omitted/`false`) shape is the\n * original single-select API, unchanged (`value: string | null`); passing\n * `multiple: true` switches to the array-valued shape (`value: string[]`).\n */\nexport type ComboboxProps = ComboboxSingleProps | ComboboxMultiProps;\n\nfunction groupMembers(options: ComboboxOption[], group: string): string[] {\n return options.filter((o) => o.group === group && !o.disabled).map((o) => o.value);\n}\n\ntype GroupCheckState = \"checked\" | \"unchecked\" | \"indeterminate\";\n\nfunction groupCheckState(options: ComboboxOption[], selectedValues: string[], group: string): GroupCheckState {\n const members = groupMembers(options, group);\n const selectedCount = members.filter((v) => selectedValues.includes(v)).length;\n if (selectedCount === 0) return \"unchecked\";\n return selectedCount === members.length ? \"checked\" : \"indeterminate\";\n}\n\n/** If the current multi-select selection is exactly one or more *fully* selected\n * groups and nothing else, returns those groups' labels joined by \", \" (e.g. \"Team A\"\n * or \"Team A, Team B\") — so picking a manager's whole team via its header checkbox\n * shows the team's name on the trigger instead of a bare \"6 selected\". A group\n * selected alongside anything it doesn't fully cover (a partial group, or a full\n * group plus an extra individual pick) returns `null`, falling back to the count. */\nfunction resolveGroupTriggerLabel(\n options: ComboboxOption[],\n selectedValues: string[],\n groupLabel: (group: string) => string,\n): string | null {\n const selectedSet = new Set(selectedValues);\n const groupsPresent = Array.from(\n new Set(options.filter((o) => selectedSet.has(o.value) && o.group).map((o) => o.group as string)),\n );\n if (groupsPresent.length === 0) return null;\n\n const coveredValues = new Set<string>();\n const fullyCoveredGroups: string[] = [];\n for (const group of groupsPresent) {\n const members = groupMembers(options, group);\n if (members.length > 0 && members.every((v) => selectedSet.has(v))) {\n fullyCoveredGroups.push(group);\n for (const v of members) coveredValues.add(v);\n }\n }\n const hasLeftover = selectedValues.some((v) => !coveredValues.has(v));\n if (fullyCoveredGroups.length === 0 || hasLeftover) return null;\n return fullyCoveredGroups.map(groupLabel).join(\", \");\n}\n\ninterface OptionRow {\n option: ComboboxOption;\n index: number;\n /** Set when this option starts a new group — i.e. it's the first (post-filter)\n * option carrying this `group` key. Render a header right before it. */\n headerGroup: string | undefined;\n}\n\n/** Decorates `visibleOptions` with where a group header belongs, in one linear pass —\n * kept separate from JSX so the render below is a plain `.map()` with no per-row\n * bookkeeping of its own. */\nfunction buildOptionRows(visibleOptions: ComboboxOption[]): OptionRow[] {\n let lastGroup: string | undefined;\n return visibleOptions.map((option, index) => {\n const headerGroup = option.group && option.group !== lastGroup ? option.group : undefined;\n lastGroup = option.group ?? lastGroup;\n return { option, index, headerGroup };\n });\n}\n\n/**\n * A searchable dropdown (\"autocomplete box\"), single- or multi-select\n * depending on the `multiple` prop: a button trigger showing the current\n * selection, opening a popover with a text filter above a scrollable option\n * list. Deliberately built on the existing `Popover` + `Input` primitives\n * rather than a `cmdk`-based `Command` component — this mirrors\n * `@bmsuisse/datagrid`'s `EnumFilter` (plain substring filter over a manually\n * rendered list), keeping the dependency footprint the same as the rest of\n * this package instead of introducing a new list/command library.\n */\nexport function Combobox(props: ComboboxProps): ReactElement {\n const {\n options,\n placeholder = \"Select…\",\n searchPlaceholder = \"Search…\",\n emptyMessage = \"No matches.\",\n disabled,\n loading = false,\n loadingMessage = \"Loading…\",\n clearable = true,\n className,\n id,\n groupLabels,\n container,\n onSearchChange,\n selectedLabel,\n } = props;\n const testId = props[\"data-testid\"];\n const [open, setOpen] = useState(false);\n const [search, setSearch] = useState(\"\");\n const [activeIndex, setActiveIndex] = useState(0);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Normalize both modes to an array so the rest of the component (rendering,\n // active-index bookkeeping) doesn't need to branch on `multiple` at all —\n // only `selectOption` and the clear affordance need mode-specific behavior.\n const selectedValues = useMemo<string[]>(\n () => (props.multiple ? props.value : props.value ? [props.value] : []),\n [props.multiple, props.value],\n );\n\n const selectedOptions = useMemo(\n () => options.filter((option) => selectedValues.includes(option.value)),\n [options, selectedValues],\n );\n\n // In server-driven search mode (`onSearchChange` given), `options` is assumed\n // to already be the caller's current result set — filtering it again locally\n // against a possibly-stale `search` term would double-filter and could hide\n // options the server already matched on fields other than `label`.\n const visibleOptions = useMemo(() => {\n if (onSearchChange) return options;\n const term = search.trim().toLowerCase();\n if (!term) return options;\n return options.filter((option) => option.label.toLowerCase().includes(term));\n }, [options, search, onSearchChange]);\n\n // Reset the search box and re-point `activeIndex` at the current selection\n // each time the popover opens — intentionally NOT reactive to `options`/\n // `value` changes while it stays open, only to the open transition itself.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (!open) return;\n setSearch(\"\");\n onSearchChange?.(\"\");\n const firstSelected = selectedValues[0];\n const selectedIdx = firstSelected ? options.findIndex((option) => option.value === firstSelected) : -1;\n setActiveIndex(selectedIdx >= 0 ? selectedIdx : 0);\n inputRef.current?.focus();\n }, [open]);\n\n // Keep the active index in range as the visible list shrinks/grows while typing.\n useEffect(() => {\n setActiveIndex((i) => Math.min(i, Math.max(visibleOptions.length - 1, 0)));\n }, [visibleOptions.length]);\n\n function selectOption(option: ComboboxOption): void {\n if (option.disabled) return;\n if (props.multiple) {\n const next = props.value.includes(option.value)\n ? props.value.filter((v) => v !== option.value)\n : [...props.value, option.value];\n props.onChange(next);\n return; // multi-select stays open so the user can pick several\n }\n props.onChange(option.value);\n setOpen(false);\n }\n\n function handleKeyDown(event: KeyboardEvent<HTMLInputElement>): void {\n if (event.key === \"ArrowDown\") {\n event.preventDefault();\n setActiveIndex((i) => Math.min(i + 1, visibleOptions.length - 1));\n } else if (event.key === \"ArrowUp\") {\n event.preventDefault();\n setActiveIndex((i) => Math.max(i - 1, 0));\n } else if (event.key === \"Enter\") {\n event.preventDefault();\n const option = visibleOptions[activeIndex];\n if (option) selectOption(option);\n }\n }\n\n const groupLabel = (group: string): string => groupLabels?.[group] ?? group;\n\n function toggleGroup(group: string): void {\n if (!props.multiple) return;\n const members = groupMembers(options, group);\n const next =\n groupCheckState(options, selectedValues, group) === \"checked\"\n ? props.value.filter((v) => !members.includes(v))\n : Array.from(new Set([...props.value, ...members]));\n props.onChange(next);\n }\n\n // \"N selected\" once 2+ are picked (multi-select only — single-select never exceeds\n // 1); the single label at exactly 1; the placeholder at 0; a fully-selected group's\n // own label(s) in place of the count when that applies (see resolveGroupTriggerLabel).\n const triggerLabel = loading\n ? loadingMessage\n : selectedOptions.length === 0\n ? (selectedValues.length > 0 ? (selectedLabel ?? placeholder) : placeholder)\n : selectedOptions.length === 1\n ? (selectedOptions[0]?.label ?? placeholder)\n : (props.multiple ? resolveGroupTriggerLabel(options, selectedValues, groupLabel) : null) ??\n `${selectedOptions.length} selected`;\n\n const optionRows = useMemo(() => buildOptionRows(visibleOptions), [visibleOptions]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n id={id}\n data-testid={testId}\n type=\"button\"\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled || loading}\n className={cn(\n \"w-full justify-between font-normal\",\n (selectedOptions.length === 0 || loading) && \"text-muted-foreground\",\n className,\n )}\n >\n <span className=\"truncate\">{triggerLabel}</span>\n <span className=\"flex items-center gap-1\">\n {clearable && !loading && selectedValues.length > 0 ? (\n <span\n role=\"button\"\n aria-label=\"Clear selection\"\n tabIndex={-1}\n className=\"rounded-sm p-0.5 opacity-60 hover:bg-accent hover:opacity-100\"\n onClick={(event) => {\n event.stopPropagation();\n if (props.multiple) {\n props.onChange([]);\n } else {\n props.onChange(null);\n }\n }}\n >\n <X className=\"h-3.5 w-3.5\" />\n </span>\n ) : null}\n <ChevronsUpDown className=\"h-4 w-4 shrink-0 opacity-50\" aria-hidden=\"true\" />\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n align=\"start\"\n container={container}\n className=\"w-[var(--radix-popover-trigger-width)] min-w-[10rem] p-2\"\n onOpenAutoFocus={(event) => event.preventDefault()}\n >\n <div className=\"flex flex-col gap-2\">\n <Input\n ref={inputRef}\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n onSearchChange?.(event.target.value);\n }}\n onKeyDown={handleKeyDown}\n placeholder={searchPlaceholder}\n aria-label={searchPlaceholder}\n />\n <div role=\"listbox\" className=\"flex max-h-60 flex-col gap-0.5 overflow-y-auto\">\n {optionRows.length === 0 ? (\n <p className=\"py-2 text-center text-sm text-muted-foreground\">{emptyMessage}</p>\n ) : (\n optionRows.map(({ option, index, headerGroup }) => {\n const isSelected = selectedValues.includes(option.value);\n const isActive = index === activeIndex;\n const headerState = headerGroup ? groupCheckState(options, selectedValues, headerGroup) : undefined;\n return (\n <div key={option.value}>\n {headerGroup ? (\n <div\n data-group-header\n className=\"mt-1 flex items-center gap-2 rounded-sm bg-muted/50 px-2 py-1.5 text-sm font-semibold text-foreground first:mt-0\"\n >\n {props.multiple ? (\n <input\n type=\"checkbox\"\n checked={headerState === \"checked\"}\n ref={(el) => {\n if (el) el.indeterminate = headerState === \"indeterminate\";\n }}\n onChange={() => toggleGroup(headerGroup)}\n onClick={(event) => event.stopPropagation()}\n className=\"h-3.5 w-3.5 shrink-0 accent-primary\"\n aria-label={`Select all of ${groupLabel(headerGroup)}`}\n />\n ) : null}\n <span className=\"truncate\">{groupLabel(headerGroup)}</span>\n </div>\n ) : null}\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={isSelected}\n disabled={option.disabled}\n data-testid={testId ? `${testId}-option` : undefined}\n data-option-value={option.value}\n onMouseEnter={() => setActiveIndex(index)}\n onClick={() => selectOption(option)}\n className={cn(\n \"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm outline-none disabled:pointer-events-none disabled:opacity-50\",\n isActive && \"bg-accent text-accent-foreground\",\n )}\n >\n {props.multiple ? (\n <input\n type=\"checkbox\"\n checked={isSelected}\n readOnly\n tabIndex={-1}\n className=\"pointer-events-none h-3.5 w-3.5 shrink-0 accent-primary\"\n />\n ) : (\n <Check className={cn(\"h-4 w-4 shrink-0\", isSelected ? \"opacity-100\" : \"opacity-0\")} />\n )}\n <span className=\"truncate\">{option.label}</span>\n </button>\n </div>\n );\n })\n )}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n );\n}\n","import { AlertCircle, AlertTriangle, CheckCircle2, Info } from \"lucide-react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport type AlertBoxVariant = \"error\" | \"warning\" | \"info\" | \"success\";\n\nexport interface AlertBoxProps {\n /** Determines the color scheme and the default icon. */\n variant: AlertBoxVariant;\n /** Optional bold heading line shown above the body content. */\n title?: string;\n /** Body text/content. Always rendered. */\n children: ReactNode;\n className?: string;\n /**\n * Overrides the default variant icon entirely. Pass `null` to hide the\n * icon. Defaults to a variant-specific lucide-react icon.\n */\n icon?: ReactNode;\n}\n\n// `error` reuses the shared `destructive` theme token, matching the banner\n// pattern already used elsewhere. `warning`/`info`/`success` have no equivalent tokens\n// in @bmsuisse/ui's theme (it only defines background/foreground/primary/muted/\n// popover/accent/destructive/border/input/ring), so these three variants use\n// fixed Tailwind palette colors instead of theme tokens. A consumer app with\n// different brand colors will need to override these via `className`.\nconst variantStyles: Record<AlertBoxVariant, string> = {\n error: \"border-destructive bg-destructive/10 text-destructive\",\n warning: \"border-amber-500 bg-amber-500/10 text-amber-700 dark:text-amber-300\",\n info: \"border-sky-500 bg-sky-500/10 text-sky-700 dark:text-sky-300\",\n success: \"border-emerald-500 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300\",\n};\n\nconst defaultIcons: Record<AlertBoxVariant, ReactElement> = {\n error: <AlertCircle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n warning: <AlertTriangle className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n info: <Info className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n success: <CheckCircle2 className=\"h-4 w-4 shrink-0\" aria-hidden=\"true\" />,\n};\n\nexport const AlertBox = ({ variant, title, children, className, icon }: AlertBoxProps): ReactElement => {\n const resolvedIcon = icon === undefined ? defaultIcons[variant] : icon;\n\n return (\n <div className={cn(\"rounded-md border p-3 text-sm\", variantStyles[variant], className)}>\n <div className=\"flex flex-row items-start gap-2\">\n {resolvedIcon != null && <span className=\"mt-0.5 shrink-0\">{resolvedIcon}</span>}\n <div className=\"flex flex-col gap-1\">\n {title && <p className=\"font-bold\">{title}</p>}\n <div>{children}</div>\n </div>\n </div>\n </div>\n );\n};\n","import type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Badge } from \"../../primitives/badge\";\n\n/** Semantic color intent for a {@link StatusBadge}. */\nexport type StatusTone = \"success\" | \"warning\" | \"error\" | \"info\" | \"neutral\";\n\n/**\n * Class names per tone. `success` / `warning` / `info` fall back to fixed\n * Tailwind palette shades (with `dark:` variants, since this package's dark\n * mode is a `.dark` ancestor class) because the shared theme currently only\n * defines background/foreground/primary/muted/popover/accent/destructive/\n * border/input/ring tokens — no warning/info/success tokens exist yet, same\n * reasoning AlertBox uses for those tones. `error` and `neutral` instead\n * reuse the existing `destructive` and `muted` theme tokens directly.\n */\nconst TONE_CLASSES: Record<StatusTone, string> = {\n success: \"border-transparent bg-emerald-500/15 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300\",\n warning: \"border-transparent bg-amber-500/15 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300\",\n info: \"border-transparent bg-sky-500/15 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300\",\n error: \"border-transparent bg-destructive/15 text-destructive\",\n neutral: \"border-transparent bg-muted text-muted-foreground\",\n};\n\n/** Built-in status vocabulary, matched case-insensitively against `status.toLowerCase()`. */\nconst DEFAULT_TONE_MAP: Record<string, StatusTone> = {\n active: \"success\",\n approved: \"success\",\n completed: \"success\",\n paid: \"success\",\n done: \"success\",\n pending: \"warning\",\n draft: \"warning\",\n in_review: \"warning\",\n inreview: \"warning\",\n rejected: \"error\",\n failed: \"error\",\n cancelled: \"error\",\n canceled: \"error\",\n overdue: \"error\",\n inactive: \"neutral\",\n archived: \"neutral\",\n new: \"info\",\n};\n\n/** Title-cases a raw status value and replaces underscores/hyphens with spaces, e.g. `\"in_review\"` -> `\"In Review\"`. */\nfunction deriveLabel(status: string): string {\n return status\n .replace(/[_-]+/g, \" \")\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n}\n\n/**\n * Resolves a status to a {@link StatusTone}.\n *\n * Resolution order: explicit `tone` prop > caller's `toneMap` (case-insensitive\n * key match) > built-in default map (case-insensitive) > `neutral` fallback.\n */\nfunction resolveTone(status: string, tone?: StatusTone, toneMap?: Record<string, StatusTone>): StatusTone {\n if (tone) {\n return tone;\n }\n\n const key = status.toLowerCase();\n\n if (toneMap) {\n for (const [candidate, candidateTone] of Object.entries(toneMap)) {\n if (candidate.toLowerCase() === key) {\n return candidateTone;\n }\n }\n }\n\n return DEFAULT_TONE_MAP[key] ?? \"neutral\";\n}\n\nexport interface StatusBadgeProps extends Omit<HTMLAttributes<HTMLDivElement>, \"children\"> {\n /** Raw status value from the caller's domain, e.g. `\"pending\"`, `\"APPROVED\"`, `\"in_review\"`. */\n status: string;\n /** Overrides the displayed text. Defaults to a title-cased, space-separated derivation of `status`. */\n label?: string;\n /** Explicit tone override. When provided, `toneMap` and the built-in default map are skipped entirely. */\n tone?: StatusTone;\n /** Caller-supplied status-to-tone mapping (case-insensitive keys), checked before the built-in default map. */\n toneMap?: Record<string, StatusTone>;\n}\n\n/**\n * A status-to-color badge, built on the shared `Badge` primitive.\n *\n * Centralizes the status->color mapping that's otherwise reimplemented ad hoc\n * per app: callers can rely on the built-in English status vocabulary, supply\n * their own `toneMap` for domain-specific statuses, or force a `tone`\n * outright.\n */\nexport const StatusBadge = ({ status, label, tone, toneMap, className, ...props }: StatusBadgeProps): ReactElement => {\n const resolvedTone = resolveTone(status, tone, toneMap);\n const displayLabel = label ?? deriveLabel(status);\n\n return (\n <Badge variant=\"outline\" className={cn(TONE_CLASSES[resolvedTone], className)} {...props}>\n {displayLabel}\n </Badge>\n );\n};\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Loader2 } from \"lucide-react\";\nimport type { HTMLAttributes, ReactElement } from \"react\";\nimport { cn } from \"../../lib/utils\";\n\nexport const loadingSpinnerIconVariants = cva(\"animate-spin text-muted-foreground\", {\n variants: {\n size: {\n sm: \"h-3.5 w-3.5\",\n default: \"h-4 w-4\",\n lg: \"h-6 w-6\",\n },\n },\n defaultVariants: {\n size: \"default\",\n },\n});\n\nexport interface LoadingSpinnerProps\n extends HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof loadingSpinnerIconVariants> {\n /** Optional text rendered next to the spinner. Omitted entirely renders an icon-only spinner. */\n label?: string;\n}\n\n/** Inline loading indicator: a spinning icon with an optional label, e.g. `<LoadingSpinner label=\"Saving…\" />`. */\nexport const LoadingSpinner = ({\n size,\n label,\n className,\n ...props\n}: LoadingSpinnerProps): ReactElement => (\n <span role=\"status\" className={cn(\"inline-flex items-center gap-2\", className)} {...props}>\n <Loader2 className={cn(loadingSpinnerIconVariants({ size }))} aria-hidden=\"true\" />\n {label ? <span>{label}</span> : null}\n </span>\n);\n\nexport interface LoadingOverlayProps\n extends HTMLAttributes<HTMLDivElement>,\n Pick<LoadingSpinnerProps, \"label\"> {\n size?: LoadingSpinnerProps[\"size\"];\n}\n\n/** Centers a larger `LoadingSpinner` inside a full container/page — use as a route or panel loading state. */\nexport const LoadingOverlay = ({\n size = \"lg\",\n label,\n className,\n ...props\n}: LoadingOverlayProps): ReactElement => (\n <div\n className={cn(\"flex h-full min-h-32 w-full items-center justify-center\", className)}\n {...props}\n >\n <LoadingSpinner size={size} label={label} />\n </div>\n);\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAA4B,WAAW;AAEvC,SA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CAAC,EAAE,QAAQ,OAAO,MAAM,SAAS,WAAW,GAAG,MAAM,MAAsC;AACpH,QAAM,eAAe,YAAY,QAAQ,MAAM,OAAO;AACtD,QAAM,eAAe,SAAS,YAAY,MAAM;AAEhD,SACE,gBAAAA,MAAC,SAAM,SAAQ,WAAU,WAAW,GAAG,aAAa,YAAY,GAAG,SAAS,GAAI,GAAG,OAChF,wBACH;AAEJ;;;AC5GA,SAA4B,OAAAC,YAAW;AACvC,SAAS,eAAe;AA+BtB,SACE,OAAAC,OADF,QAAAC,cAAA;AA3BK,IAAM,6BAA6BC,KAAI,sCAAsC;AAAA,EAClF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAUM,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,gBAAAD,OAAC,UAAK,MAAK,UAAS,WAAW,GAAG,kCAAkC,SAAS,GAAI,GAAG,OAClF;AAAA,kBAAAD,MAAC,WAAQ,WAAW,GAAG,2BAA2B,EAAE,KAAK,CAAC,CAAC,GAAG,eAAY,QAAO;AAAA,EAChF,QAAQ,gBAAAA,MAAC,UAAM,iBAAM,IAAU;AAAA,GAClC;AAUK,IAAM,iBAAiB,CAAC;AAAA,EAC7B,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE,gBAAAA;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,2DAA2D,SAAS;AAAA,IACjF,GAAG;AAAA,IAEJ,0BAAAA,MAAC,kBAAe,MAAY,OAAc;AAAA;AAC5C;","names":["forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","jsx","cva","jsx","cva","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","jsxs","forwardRef","jsx","Check","forwardRef","jsx","forwardRef","Check","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","forwardRef","forwardRef","jsx","jsxs","forwardRef","forwardRef","jsx","forwardRef","Check","forwardRef","jsx","jsxs","forwardRef","Check","cva","DialogPrimitive","X","forwardRef","jsx","jsxs","forwardRef","cva","X","forwardRef","jsx","forwardRef","jsx","jsxs","jsx","jsxs","useState","jsx","jsxs","useState","jsx","jsxs","Check","X","useState","jsx","jsxs","useState","X","Check","jsx","jsxs","jsx","cva","jsx","jsxs","cva"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bmsuisse/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Shared shadcn/ui-based React primitives and composed UI patterns (Modal, FormField, AlertBox, StatusBadge, LoadingSpinner, Sheet, Tooltip).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|