@bmsuisse/ui 0.16.0 → 0.16.1

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.d.ts CHANGED
@@ -55,6 +55,7 @@ declare const DialogContent: react.ForwardRefExoticComponent<Omit<DialogPrimitiv
55
55
  declare const DialogHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
56
56
  declare const DialogTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
57
57
  declare const DialogDescription: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
58
+ declare const DialogBody: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
58
59
  declare const DialogFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
59
60
 
60
61
  declare const Popover: react.FC<PopoverPrimitive.PopoverProps>;
@@ -144,6 +145,7 @@ interface SheetContentProps extends ComponentPropsWithoutRef<typeof DialogPrimit
144
145
  }
145
146
  declare const SheetContent: react.ForwardRefExoticComponent<SheetContentProps & react.RefAttributes<HTMLDivElement>>;
146
147
  declare const SheetHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
148
+ declare const SheetBody: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
147
149
  declare const SheetFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => ReactElement;
148
150
  declare const SheetTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
149
151
  declare const SheetDescription: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
@@ -1194,4 +1196,4 @@ type ConfirmButtonPlacement = "leading" | "trailing";
1194
1196
  */
1195
1197
  declare function getConfirmButtonPlacement(): ConfirmButtonPlacement;
1196
1198
 
1197
- export { AiButton, type AiButtonProps, type AiButtonVariant, AiExplainButton, type AiExplainButtonProps, AlertBox, type AlertBoxProps, type AlertBoxVariant, Badge, type BadgeProps, Button, ButtonGroup, type ButtonGroupOption, type ButtonGroupProps, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, type GridColumn as ComboboxColumn, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, type ConfirmButtonPlacement, ConfirmDialog, type ConfirmDialogProps, Dialog, DialogActions, type DialogActionsProps, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DonutChart, type DonutSegment, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FormField, type FormFieldProps, FormModal, type FormModalProps, Input, type InputProps, KpiCard, type KpiCardProps, Label, LoadingOverlay, type LoadingOverlayProps, LoadingSpinner, type LoadingSpinnerProps, Modal, type ModalProps, NavGroup, type NavGroupProps, type NavIconProps, NavItem, type NavItemProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuestionDialog, type QuestionDialogAction, type QuestionDialogProps, ResponsivePanel, type ResponsivePanelProps, type ResponsivePanelSize, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchPanel, type SearchPanelMode, type SearchPanelProps, SearchTrigger, type SearchTriggerProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarNav, type SidebarNavProps, type SidebarProps, Skeleton, Sparkline, type SpeechRecognitionEngine, type SpeechRecognitionEngineFactory, type SpeechRecognitionState, StatusBadge, type StatusBadgeProps, type StatusTone, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagCombobox, type TagComboboxOption, type TagComboboxProps, Textarea, type TextareaProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseSpeechRecognitionOptions, VoiceInputButton, type VoiceInputButtonProps, VoiceTranscript, type VoiceTranscriptProps, badgeVariants, buttonVariants, cn, describeSpeechError, getConfirmButtonPlacement, isWindowsPlatform, loadingSpinnerIconVariants, sheetVariants, useMediaQuery, useSidebarCollapsed, useSpeechRecognition };
1199
+ export { AiButton, type AiButtonProps, type AiButtonVariant, AiExplainButton, type AiExplainButtonProps, AlertBox, type AlertBoxProps, type AlertBoxVariant, Badge, type BadgeProps, Button, ButtonGroup, type ButtonGroupOption, type ButtonGroupProps, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Combobox, type GridColumn as ComboboxColumn, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, type ConfirmButtonPlacement, ConfirmDialog, type ConfirmDialogProps, Dialog, DialogActions, type DialogActionsProps, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DonutChart, type DonutSegment, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FormField, type FormFieldProps, FormModal, type FormModalProps, Input, type InputProps, KpiCard, type KpiCardProps, Label, LoadingOverlay, type LoadingOverlayProps, LoadingSpinner, type LoadingSpinnerProps, Modal, type ModalProps, NavGroup, type NavGroupProps, type NavIconProps, NavItem, type NavItemProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuestionDialog, type QuestionDialogAction, type QuestionDialogProps, ResponsivePanel, type ResponsivePanelProps, type ResponsivePanelSize, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SearchPanel, type SearchPanelMode, type SearchPanelProps, SearchTrigger, type SearchTriggerProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetBody, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarNav, type SidebarNavProps, type SidebarProps, Skeleton, Sparkline, type SpeechRecognitionEngine, type SpeechRecognitionEngineFactory, type SpeechRecognitionState, StatusBadge, type StatusBadgeProps, type StatusTone, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagCombobox, type TagComboboxOption, type TagComboboxProps, Textarea, type TextareaProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseSpeechRecognitionOptions, VoiceInputButton, type VoiceInputButtonProps, VoiceTranscript, type VoiceTranscriptProps, badgeVariants, buttonVariants, cn, describeSpeechError, getConfirmButtonPlacement, isWindowsPlatform, loadingSpinnerIconVariants, sheetVariants, useMediaQuery, useSidebarCollapsed, useSpeechRecognition };
package/dist/index.js CHANGED
@@ -188,7 +188,7 @@ var DialogContent = forwardRef5(({ className, children, showCloseButton = true,
188
188
  {
189
189
  ref,
190
190
  className: cn(
191
- "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",
191
+ "fixed left-1/2 top-1/2 z-50 flex max-h-[85vh] w-full max-w-md -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border bg-background shadow-lg",
192
192
  className
193
193
  ),
194
194
  ...props,
@@ -198,7 +198,7 @@ var DialogContent = forwardRef5(({ className, children, showCloseButton = true,
198
198
  DialogPrimitive.Close,
199
199
  {
200
200
  "data-testid": closeButtonTestId,
201
- className: "absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100",
201
+ className: "absolute right-4 top-4 z-20 rounded-sm opacity-70 hover:opacity-100",
202
202
  children: [
203
203
  /* @__PURE__ */ jsx7(X, { className: "h-4 w-4" }),
204
204
  /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Close" })
@@ -213,7 +213,7 @@ DialogContent.displayName = "DialogContent";
213
213
  var DialogHeader = ({
214
214
  className,
215
215
  ...props
216
- }) => /* @__PURE__ */ jsx7("div", { className: cn("flex flex-col gap-1.5", className), ...props });
216
+ }) => /* @__PURE__ */ jsx7("div", { className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6", className), ...props });
217
217
  var DialogTitle = forwardRef5(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(DialogPrimitive.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
218
218
  DialogTitle.displayName = "DialogTitle";
219
219
  var DialogDescription = forwardRef5(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
@@ -225,10 +225,20 @@ var DialogDescription = forwardRef5(({ className, ...props }, ref) => /* @__PURE
225
225
  }
226
226
  ));
227
227
  DialogDescription.displayName = "DialogDescription";
228
+ var DialogBody = ({
229
+ className,
230
+ ...props
231
+ }) => /* @__PURE__ */ jsx7("div", { className: cn("min-h-0 flex-1 overflow-y-auto px-6 pb-6", className), ...props });
228
232
  var DialogFooter = ({
229
233
  className,
230
234
  ...props
231
- }) => /* @__PURE__ */ jsx7("div", { className: cn("mt-4 flex justify-end gap-2", className), ...props });
235
+ }) => /* @__PURE__ */ jsx7(
236
+ "div",
237
+ {
238
+ className: cn("-mt-6 flex shrink-0 justify-end gap-2 px-6 pb-6 pt-4", className),
239
+ ...props
240
+ }
241
+ );
232
242
 
233
243
  // src/primitives/popover.tsx
234
244
  import * as PopoverPrimitive from "@radix-ui/react-popover";
@@ -650,7 +660,7 @@ var SheetOverlay = forwardRef15(({ className, ...props }, ref) => /* @__PURE__ *
650
660
  ));
651
661
  SheetOverlay.displayName = "SheetOverlay";
652
662
  var sheetVariants = cva3(
653
- "fixed z-50 gap-4 bg-background p-6 shadow-lg transition-[transform,box-shadow] duration-300 ease-in-out",
663
+ "fixed z-50 flex flex-col gap-4 overflow-hidden bg-background p-6 shadow-lg transition-[transform,box-shadow] duration-300 ease-in-out",
654
664
  {
655
665
  variants: {
656
666
  side: {
@@ -753,11 +763,15 @@ SheetContent.displayName = "SheetContent";
753
763
  var SheetHeader = ({
754
764
  className,
755
765
  ...props
756
- }) => /* @__PURE__ */ jsx18("div", { className: cn("flex flex-col gap-1.5", className), ...props });
766
+ }) => /* @__PURE__ */ jsx18("div", { className: cn("flex shrink-0 flex-col gap-1.5", className), ...props });
767
+ var SheetBody = ({
768
+ className,
769
+ ...props
770
+ }) => /* @__PURE__ */ jsx18("div", { className: cn("min-h-0 flex-1 overflow-y-auto", className), ...props });
757
771
  var SheetFooter = ({
758
772
  className,
759
773
  ...props
760
- }) => /* @__PURE__ */ jsx18("div", { className: cn("flex justify-end gap-2", className), ...props });
774
+ }) => /* @__PURE__ */ jsx18("div", { className: cn("flex shrink-0 justify-end gap-2", className), ...props });
761
775
  var SheetTitle = forwardRef15(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(DialogPrimitive2.Title, { ref, className: cn("text-lg font-semibold", className), ...props }));
762
776
  SheetTitle.displayName = "SheetTitle";
763
777
  var SheetDescription = forwardRef15(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
@@ -806,7 +820,7 @@ var Modal = ({
806
820
  /* @__PURE__ */ jsx20(DialogTitle, { children: title }),
807
821
  description ? /* @__PURE__ */ jsx20(DialogDescription, { children: description }) : null
808
822
  ] }),
809
- children,
823
+ /* @__PURE__ */ jsx20(DialogBody, { children }),
810
824
  footer ? /* @__PURE__ */ jsx20(DialogFooter, { children: footer }) : null
811
825
  ] }) });
812
826
 
@@ -928,12 +942,12 @@ var FormModal = ({
928
942
  const handleCancel = () => {
929
943
  onOpenChange(false);
930
944
  };
931
- return /* @__PURE__ */ jsx23(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx23(DialogContent, { className, children: /* @__PURE__ */ jsxs8("form", { onSubmit: handleSubmit, children: [
945
+ return /* @__PURE__ */ jsx23(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx23(DialogContent, { className, children: /* @__PURE__ */ jsxs8("form", { onSubmit: handleSubmit, className: "flex min-h-0 flex-1 flex-col", children: [
932
946
  /* @__PURE__ */ jsxs8(DialogHeader, { children: [
933
947
  /* @__PURE__ */ jsx23(DialogTitle, { children: title }),
934
948
  description ? /* @__PURE__ */ jsx23(DialogDescription, { children: description }) : null
935
949
  ] }),
936
- children,
950
+ /* @__PURE__ */ jsx23(DialogBody, { children }),
937
951
  /* @__PURE__ */ jsxs8(DialogFooter, { children: [
938
952
  /* @__PURE__ */ jsx23(
939
953
  Button,
@@ -1104,7 +1118,7 @@ var ResponsivePanel = ({
1104
1118
  onInteractOutside,
1105
1119
  style: resizable || draggable ? geometry.style : void 0,
1106
1120
  className: cn(
1107
- "max-h-[85vh] overflow-y-auto transition-shadow duration-150 ease-out",
1121
+ "max-h-[85vh] transition-shadow duration-150 ease-out",
1108
1122
  geometry.isDragging && "shadow-2xl ring-2 ring-primary/30",
1109
1123
  desktopSizeClasses[size],
1110
1124
  className
@@ -1149,7 +1163,7 @@ var ResponsivePanel = ({
1149
1163
  ]
1150
1164
  }
1151
1165
  ),
1152
- children,
1166
+ /* @__PURE__ */ jsx24(DialogBody, { children }),
1153
1167
  footer ? /* @__PURE__ */ jsx24(DialogFooter, { children: footer }) : null
1154
1168
  ]
1155
1169
  }
@@ -1161,17 +1175,13 @@ var ResponsivePanel = ({
1161
1175
  side: "bottom",
1162
1176
  resizable,
1163
1177
  onInteractOutside,
1164
- className: cn(
1165
- "flex flex-col overflow-y-auto rounded-t-2xl",
1166
- drawerSizeClasses[size],
1167
- className
1168
- ),
1178
+ className: cn("rounded-t-2xl", drawerSizeClasses[size], className),
1169
1179
  children: [
1170
1180
  /* @__PURE__ */ jsxs9(SheetHeader, { children: [
1171
1181
  /* @__PURE__ */ jsx24(SheetTitle, { children: title }),
1172
1182
  description ? /* @__PURE__ */ jsx24(SheetDescription, { children: description }) : null
1173
1183
  ] }),
1174
- children,
1184
+ /* @__PURE__ */ jsx24(SheetBody, { children }),
1175
1185
  footer ? /* @__PURE__ */ jsx24(SheetFooter, { children: footer }) : null
1176
1186
  ]
1177
1187
  }
@@ -3151,6 +3161,7 @@ export {
3151
3161
  ConfirmDialog,
3152
3162
  Dialog,
3153
3163
  DialogActions,
3164
+ DialogBody,
3154
3165
  DialogContent,
3155
3166
  DialogDescription,
3156
3167
  DialogFooter,
@@ -3202,6 +3213,7 @@ export {
3202
3213
  SelectValue,
3203
3214
  Separator,
3204
3215
  Sheet,
3216
+ SheetBody,
3205
3217
  SheetClose,
3206
3218
  SheetContent,
3207
3219
  SheetDescription,