@doscientos/ui 0.1.8 → 0.1.9

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.cts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { RefCallback, ReactNode, ComponentPropsWithRef } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as react_aria_components from 'react-aria-components';
5
- import { DisclosureGroup, DisclosurePanel, DisclosureProps, Button as Button$1, Breadcrumb as Breadcrumb$1, Link, Breadcrumbs as Breadcrumbs$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ComboBoxProps, Key, Popover as Popover$1, InputProps as InputProps$1, ListBoxItemProps, ListBoxProps, Input as Input$1, ListBox, ModalOverlayProps, DialogProps as DialogProps$1, Text, Heading, MenuItemProps, Separator as Separator$1, MenuTrigger as MenuTrigger$1, TextAreaProps, MenuProps, PopoverProps as PopoverProps$1, DialogTrigger, NumberFieldProps, SearchFieldProps, SelectProps, SelectValue as SelectValue$1, SeparatorProps as SeparatorProps$1, LinkProps, SwitchFieldProps, SwitchButtonRenderProps, TabPanelProps as TabPanelProps$1, TabProps as TabProps$1, TabsProps as TabsProps$1, TabListProps, TabPanelsProps, TooltipProps as TooltipProps$1, TooltipTrigger as TooltipTrigger$1 } from 'react-aria-components';
5
+ import { DisclosureGroup, DisclosurePanel, DisclosureProps, Button as Button$1, Breadcrumb as Breadcrumb$1, Link, Breadcrumbs as Breadcrumbs$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ComboBoxProps, Key, Popover as Popover$1, InputProps as InputProps$1, ListBoxItemProps, ListBoxProps, Input as Input$1, ListBox, ModalOverlayProps, MenuItemProps, Separator as Separator$1, MenuTrigger as MenuTrigger$1, TextAreaProps, MenuProps, PopoverProps as PopoverProps$1, DialogTrigger, NumberFieldProps, SearchFieldProps, SelectProps, SelectValue as SelectValue$1, SeparatorProps as SeparatorProps$1, LinkProps, SwitchFieldProps, SwitchButtonRenderProps, TabPanelProps as TabPanelProps$1, TabProps as TabProps$1, TabsProps as TabsProps$1, TabListProps, TabPanelsProps, TooltipProps as TooltipProps$1, TooltipTrigger as TooltipTrigger$1 } from 'react-aria-components';
6
6
  export { ComboBoxProps, ComboBoxValue as ComboboxValue, DialogTriggerProps as PopoverTriggerProps, SearchFieldProps, SelectProps, TooltipTriggerComponentProps } from 'react-aria-components';
7
7
  import * as class_variance_authority_types from 'class-variance-authority/types';
8
8
  import { VariantProps } from 'class-variance-authority';
@@ -63,10 +63,25 @@ declare function AlertAction({ className, children, ...props }: React.ComponentP
63
63
  children?: ReactNode;
64
64
  }): react.JSX.Element;
65
65
 
66
- declare function AppShell({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
66
+ type AppShellBreakpoint = "sm" | "md" | "lg";
67
+ type AppShellProps = react.ComponentProps<"div"> & {
68
+ /** Breakpoint at which the persistent sidebar replaces the mobile header. */
69
+ sidebarBreakpoint?: AppShellBreakpoint;
70
+ };
71
+ declare function AppShell({ className, sidebarBreakpoint, ...props }: AppShellProps): react.JSX.Element;
72
+ declare function AppShellSidebar({ className, ...props }: react.ComponentProps<"aside">): react.JSX.Element;
67
73
  declare function AppShellMain({ className, ...props }: react.ComponentProps<"main">): react.JSX.Element;
68
74
  declare function AppShellHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
69
- declare function AppShellContent({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
75
+ declare function AppShellMobileHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
76
+ type AppShellContentProps = react.ComponentProps<"div"> & {
77
+ /** Maximum content width. Use `full` for dense application screens. */
78
+ size?: "default" | "wide" | "full";
79
+ /** Adds the standard responsive content padding. */
80
+ padded?: boolean;
81
+ /** Lets this region scroll while the surrounding shell remains fixed. */
82
+ scrollable?: boolean;
83
+ };
84
+ declare function AppShellContent({ className, size, padded, scrollable, ...props }: AppShellContentProps): react.JSX.Element;
70
85
 
71
86
  type AvatarProps = React.ComponentProps<"div"> & {
72
87
  size?: "xs" | "sm" | "default" | "lg";
@@ -90,16 +105,16 @@ declare function BreadcrumbLink({ className, ...props }: React.ComponentProps<ty
90
105
  declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
91
106
  declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
92
107
 
108
+ declare function ButtonGroup({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
109
+ declare function ButtonGroupText({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
110
+
93
111
  declare const buttonVariants: (props?: ({
94
112
  variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
95
- size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
113
+ size?: "default" | "sm" | "lg" | "xs" | "icon" | null | undefined;
96
114
  } & class_variance_authority_types.ClassProp) | undefined) => string;
97
115
  type ButtonProps = ButtonProps$1 & VariantProps<typeof buttonVariants>;
98
116
  declare function Button({ className, variant, size, ...props }: ButtonProps): react.JSX.Element;
99
117
 
100
- declare function ButtonGroup({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
101
- declare function ButtonGroupText({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
102
-
103
118
  declare function Card({ className, ...props }: react.ComponentProps<"section">): react.JSX.Element;
104
119
  declare function CardHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
105
120
  declare function CardTitle({ className, ...props }: react.ComponentProps<"h2">): react.JSX.Element;
@@ -162,22 +177,7 @@ type ConfirmDialogProps = {
162
177
  onConfirm: () => void;
163
178
  };
164
179
  /** Controlled confirmation dialog for irreversible actions. */
165
- declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, pending, onConfirm }: ConfirmDialogProps): react.JSX.Element;
166
-
167
- type DialogProps = Omit<ModalOverlayProps, "children" | "className" | "isOpen"> & {
168
- children: React.ReactNode;
169
- open: boolean;
170
- };
171
- /** Controlled overlay root. Use `DialogContent` for its accessible surface. */
172
- declare function Dialog({ open, children, ...props }: DialogProps): react.JSX.Element;
173
- declare function DialogClose({ onPress, ...props }: React.ComponentProps<typeof Button>): react.JSX.Element;
174
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogProps$1 & {
175
- showCloseButton?: boolean;
176
- }): react.JSX.Element;
177
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
178
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
179
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Heading>): react.JSX.Element;
180
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Text>): react.JSX.Element;
180
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, pending, onConfirm, }: ConfirmDialogProps): react.JSX.Element;
181
181
 
182
182
  interface DrawerProps extends Omit<ModalOverlayProps, "children" | "className"> {
183
183
  children: React.ReactNode;
@@ -300,6 +300,29 @@ declare function MenuContent({ className, ...props }: React.ComponentProps<typeo
300
300
  declare function Menu<T extends object>({ className, ...props }: MenuProps<T>): react.JSX.Element;
301
301
  declare function MenuItem<T extends object>({ className, children, ...props }: MenuItemProps<T>): react.JSX.Element;
302
302
 
303
+ declare const sizeClasses: {
304
+ readonly sm: "w-[min(calc(100dvw-2rem),24rem)]";
305
+ readonly md: "w-[min(calc(100dvw-2rem),28rem)]";
306
+ readonly lg: "w-[min(calc(100dvw-2rem),36rem)]";
307
+ };
308
+ type ModalDialogProps = Omit<ModalOverlayProps, "children" | "className" | "isOpen" | "onOpenChange"> & {
309
+ open: boolean;
310
+ onOpenChange: (open: boolean) => void;
311
+ title: react.ReactNode;
312
+ description?: react.ReactNode;
313
+ children?: react.ReactNode;
314
+ footer?: react.ReactNode;
315
+ size?: keyof typeof sizeClasses;
316
+ showCloseButton?: boolean;
317
+ className?: string;
318
+ footerClassName?: string;
319
+ };
320
+ /**
321
+ * Accessible modal with a consistent title, optional description, body and footer.
322
+ * Its width is self-contained so consumer CSS cannot override it with max-width utilities.
323
+ */
324
+ declare function ModalDialog({ open, onOpenChange, title, description, children, footer, size, showCloseButton, className, footerClassName, ...props }: ModalDialogProps): react.JSX.Element;
325
+
303
326
  declare function PageHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
304
327
  declare function PageHeaderHeading({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
305
328
  declare function PageHeaderTitle({ className, ...props }: react.ComponentProps<"h1">): react.JSX.Element;
@@ -487,4 +510,4 @@ declare const TooltipTrigger: typeof TooltipTrigger$1;
487
510
  declare function Tooltip({ className, ...props }: TooltipProps): react.JSX.Element;
488
511
  declare const TooltipContent: typeof Tooltip;
489
512
 
490
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, type AlertProps, AlertTitle, AppShell, AppShellContent, AppShellHeader, AppShellMain, AutocompleteCombobox, type AutocompleteComboboxProps, type AutosaveStatus, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, ButtonGroup, ButtonGroupText, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, Command, CommandContent, CommandInput, CommandItem, CommandList, ConfirmDialog, type ConfirmDialogProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Drawer, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateDescription, EmptyStateTitle, Field, FieldDescription, FieldError, FieldLabel, FormFeedback, type FormFeedbackProps, type FormFeedbackState, FormRow, type FormRowProps, HighlightMatch, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, Kbd, KbdGroup, Label, type LabelProps, LoadingOverlay, Menu, MenuContent, MenuItem, MenuTrigger, PageHeader, PageHeaderActions, PageHeaderDescription, PageHeaderHeading, PageHeaderTitle, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverProps, PopoverTrigger, QuantityInput, type QuantityInputProps, SearchClearButton, SearchField, SearchInput, Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarMore, SidebarProvider, SidebarRail, SidebarSearch, SidebarSeparator, SidebarTrigger, Skeleton, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, type TabPanelProps, type TabProps, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsPanels, type TabsProps, TabsTrigger, type TextMatchPart, Textarea, type TextareaProps, Toast, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, ToastViewport, Toaster, Toolbar, ToolbarGroup, ToolbarSpacer, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type UseAutosaveOptions, type UseFormDirtyResult, badgeVariants, buttonVariants, cn, formSnapshot, getTextMatchParts, toast, useAutosave, useDebouncedValue, useFormDirty, useFormFeedback, useSidebar, useToast };
513
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, type AlertProps, AlertTitle, AppShell, type AppShellBreakpoint, AppShellContent, type AppShellContentProps, AppShellHeader, AppShellMain, AppShellMobileHeader, type AppShellProps, AppShellSidebar, AutocompleteCombobox, type AutocompleteComboboxProps, type AutosaveStatus, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, ButtonGroup, ButtonGroupText, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, Command, CommandContent, CommandInput, CommandItem, CommandList, ConfirmDialog, type ConfirmDialogProps, Drawer, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateDescription, EmptyStateTitle, Field, FieldDescription, FieldError, FieldLabel, FormFeedback, type FormFeedbackProps, type FormFeedbackState, FormRow, type FormRowProps, HighlightMatch, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, Kbd, KbdGroup, Label, type LabelProps, LoadingOverlay, Menu, MenuContent, MenuItem, MenuTrigger, ModalDialog, type ModalDialogProps, PageHeader, PageHeaderActions, PageHeaderDescription, PageHeaderHeading, PageHeaderTitle, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverProps, PopoverTrigger, QuantityInput, type QuantityInputProps, SearchClearButton, SearchField, SearchInput, Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarMore, SidebarProvider, SidebarRail, SidebarSearch, SidebarSeparator, SidebarTrigger, Skeleton, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, type TabPanelProps, type TabProps, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsPanels, type TabsProps, TabsTrigger, type TextMatchPart, Textarea, type TextareaProps, Toast, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, ToastViewport, Toaster, Toolbar, ToolbarGroup, ToolbarSpacer, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type UseAutosaveOptions, type UseFormDirtyResult, badgeVariants, buttonVariants, cn, formSnapshot, getTextMatchParts, toast, useAutosave, useDebouncedValue, useFormDirty, useFormFeedback, useSidebar, useToast };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react from 'react';
2
2
  import { RefCallback, ReactNode, ComponentPropsWithRef } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as react_aria_components from 'react-aria-components';
5
- import { DisclosureGroup, DisclosurePanel, DisclosureProps, Button as Button$1, Breadcrumb as Breadcrumb$1, Link, Breadcrumbs as Breadcrumbs$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ComboBoxProps, Key, Popover as Popover$1, InputProps as InputProps$1, ListBoxItemProps, ListBoxProps, Input as Input$1, ListBox, ModalOverlayProps, DialogProps as DialogProps$1, Text, Heading, MenuItemProps, Separator as Separator$1, MenuTrigger as MenuTrigger$1, TextAreaProps, MenuProps, PopoverProps as PopoverProps$1, DialogTrigger, NumberFieldProps, SearchFieldProps, SelectProps, SelectValue as SelectValue$1, SeparatorProps as SeparatorProps$1, LinkProps, SwitchFieldProps, SwitchButtonRenderProps, TabPanelProps as TabPanelProps$1, TabProps as TabProps$1, TabsProps as TabsProps$1, TabListProps, TabPanelsProps, TooltipProps as TooltipProps$1, TooltipTrigger as TooltipTrigger$1 } from 'react-aria-components';
5
+ import { DisclosureGroup, DisclosurePanel, DisclosureProps, Button as Button$1, Breadcrumb as Breadcrumb$1, Link, Breadcrumbs as Breadcrumbs$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ComboBoxProps, Key, Popover as Popover$1, InputProps as InputProps$1, ListBoxItemProps, ListBoxProps, Input as Input$1, ListBox, ModalOverlayProps, MenuItemProps, Separator as Separator$1, MenuTrigger as MenuTrigger$1, TextAreaProps, MenuProps, PopoverProps as PopoverProps$1, DialogTrigger, NumberFieldProps, SearchFieldProps, SelectProps, SelectValue as SelectValue$1, SeparatorProps as SeparatorProps$1, LinkProps, SwitchFieldProps, SwitchButtonRenderProps, TabPanelProps as TabPanelProps$1, TabProps as TabProps$1, TabsProps as TabsProps$1, TabListProps, TabPanelsProps, TooltipProps as TooltipProps$1, TooltipTrigger as TooltipTrigger$1 } from 'react-aria-components';
6
6
  export { ComboBoxProps, ComboBoxValue as ComboboxValue, DialogTriggerProps as PopoverTriggerProps, SearchFieldProps, SelectProps, TooltipTriggerComponentProps } from 'react-aria-components';
7
7
  import * as class_variance_authority_types from 'class-variance-authority/types';
8
8
  import { VariantProps } from 'class-variance-authority';
@@ -63,10 +63,25 @@ declare function AlertAction({ className, children, ...props }: React.ComponentP
63
63
  children?: ReactNode;
64
64
  }): react.JSX.Element;
65
65
 
66
- declare function AppShell({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
66
+ type AppShellBreakpoint = "sm" | "md" | "lg";
67
+ type AppShellProps = react.ComponentProps<"div"> & {
68
+ /** Breakpoint at which the persistent sidebar replaces the mobile header. */
69
+ sidebarBreakpoint?: AppShellBreakpoint;
70
+ };
71
+ declare function AppShell({ className, sidebarBreakpoint, ...props }: AppShellProps): react.JSX.Element;
72
+ declare function AppShellSidebar({ className, ...props }: react.ComponentProps<"aside">): react.JSX.Element;
67
73
  declare function AppShellMain({ className, ...props }: react.ComponentProps<"main">): react.JSX.Element;
68
74
  declare function AppShellHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
69
- declare function AppShellContent({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
75
+ declare function AppShellMobileHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
76
+ type AppShellContentProps = react.ComponentProps<"div"> & {
77
+ /** Maximum content width. Use `full` for dense application screens. */
78
+ size?: "default" | "wide" | "full";
79
+ /** Adds the standard responsive content padding. */
80
+ padded?: boolean;
81
+ /** Lets this region scroll while the surrounding shell remains fixed. */
82
+ scrollable?: boolean;
83
+ };
84
+ declare function AppShellContent({ className, size, padded, scrollable, ...props }: AppShellContentProps): react.JSX.Element;
70
85
 
71
86
  type AvatarProps = React.ComponentProps<"div"> & {
72
87
  size?: "xs" | "sm" | "default" | "lg";
@@ -90,16 +105,16 @@ declare function BreadcrumbLink({ className, ...props }: React.ComponentProps<ty
90
105
  declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
91
106
  declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
92
107
 
108
+ declare function ButtonGroup({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
109
+ declare function ButtonGroupText({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
110
+
93
111
  declare const buttonVariants: (props?: ({
94
112
  variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
95
- size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
113
+ size?: "default" | "sm" | "lg" | "xs" | "icon" | null | undefined;
96
114
  } & class_variance_authority_types.ClassProp) | undefined) => string;
97
115
  type ButtonProps = ButtonProps$1 & VariantProps<typeof buttonVariants>;
98
116
  declare function Button({ className, variant, size, ...props }: ButtonProps): react.JSX.Element;
99
117
 
100
- declare function ButtonGroup({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
101
- declare function ButtonGroupText({ className, ...props }: React.ComponentProps<"span">): react.JSX.Element;
102
-
103
118
  declare function Card({ className, ...props }: react.ComponentProps<"section">): react.JSX.Element;
104
119
  declare function CardHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
105
120
  declare function CardTitle({ className, ...props }: react.ComponentProps<"h2">): react.JSX.Element;
@@ -162,22 +177,7 @@ type ConfirmDialogProps = {
162
177
  onConfirm: () => void;
163
178
  };
164
179
  /** Controlled confirmation dialog for irreversible actions. */
165
- declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, pending, onConfirm }: ConfirmDialogProps): react.JSX.Element;
166
-
167
- type DialogProps = Omit<ModalOverlayProps, "children" | "className" | "isOpen"> & {
168
- children: React.ReactNode;
169
- open: boolean;
170
- };
171
- /** Controlled overlay root. Use `DialogContent` for its accessible surface. */
172
- declare function Dialog({ open, children, ...props }: DialogProps): react.JSX.Element;
173
- declare function DialogClose({ onPress, ...props }: React.ComponentProps<typeof Button>): react.JSX.Element;
174
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogProps$1 & {
175
- showCloseButton?: boolean;
176
- }): react.JSX.Element;
177
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
178
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react.JSX.Element;
179
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof Heading>): react.JSX.Element;
180
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof Text>): react.JSX.Element;
180
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, pending, onConfirm, }: ConfirmDialogProps): react.JSX.Element;
181
181
 
182
182
  interface DrawerProps extends Omit<ModalOverlayProps, "children" | "className"> {
183
183
  children: React.ReactNode;
@@ -300,6 +300,29 @@ declare function MenuContent({ className, ...props }: React.ComponentProps<typeo
300
300
  declare function Menu<T extends object>({ className, ...props }: MenuProps<T>): react.JSX.Element;
301
301
  declare function MenuItem<T extends object>({ className, children, ...props }: MenuItemProps<T>): react.JSX.Element;
302
302
 
303
+ declare const sizeClasses: {
304
+ readonly sm: "w-[min(calc(100dvw-2rem),24rem)]";
305
+ readonly md: "w-[min(calc(100dvw-2rem),28rem)]";
306
+ readonly lg: "w-[min(calc(100dvw-2rem),36rem)]";
307
+ };
308
+ type ModalDialogProps = Omit<ModalOverlayProps, "children" | "className" | "isOpen" | "onOpenChange"> & {
309
+ open: boolean;
310
+ onOpenChange: (open: boolean) => void;
311
+ title: react.ReactNode;
312
+ description?: react.ReactNode;
313
+ children?: react.ReactNode;
314
+ footer?: react.ReactNode;
315
+ size?: keyof typeof sizeClasses;
316
+ showCloseButton?: boolean;
317
+ className?: string;
318
+ footerClassName?: string;
319
+ };
320
+ /**
321
+ * Accessible modal with a consistent title, optional description, body and footer.
322
+ * Its width is self-contained so consumer CSS cannot override it with max-width utilities.
323
+ */
324
+ declare function ModalDialog({ open, onOpenChange, title, description, children, footer, size, showCloseButton, className, footerClassName, ...props }: ModalDialogProps): react.JSX.Element;
325
+
303
326
  declare function PageHeader({ className, ...props }: react.ComponentProps<"header">): react.JSX.Element;
304
327
  declare function PageHeaderHeading({ className, ...props }: react.ComponentProps<"div">): react.JSX.Element;
305
328
  declare function PageHeaderTitle({ className, ...props }: react.ComponentProps<"h1">): react.JSX.Element;
@@ -487,4 +510,4 @@ declare const TooltipTrigger: typeof TooltipTrigger$1;
487
510
  declare function Tooltip({ className, ...props }: TooltipProps): react.JSX.Element;
488
511
  declare const TooltipContent: typeof Tooltip;
489
512
 
490
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, type AlertProps, AlertTitle, AppShell, AppShellContent, AppShellHeader, AppShellMain, AutocompleteCombobox, type AutocompleteComboboxProps, type AutosaveStatus, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, ButtonGroup, ButtonGroupText, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, Command, CommandContent, CommandInput, CommandItem, CommandList, ConfirmDialog, type ConfirmDialogProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, Drawer, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateDescription, EmptyStateTitle, Field, FieldDescription, FieldError, FieldLabel, FormFeedback, type FormFeedbackProps, type FormFeedbackState, FormRow, type FormRowProps, HighlightMatch, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, Kbd, KbdGroup, Label, type LabelProps, LoadingOverlay, Menu, MenuContent, MenuItem, MenuTrigger, PageHeader, PageHeaderActions, PageHeaderDescription, PageHeaderHeading, PageHeaderTitle, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverProps, PopoverTrigger, QuantityInput, type QuantityInputProps, SearchClearButton, SearchField, SearchInput, Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarMore, SidebarProvider, SidebarRail, SidebarSearch, SidebarSeparator, SidebarTrigger, Skeleton, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, type TabPanelProps, type TabProps, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsPanels, type TabsProps, TabsTrigger, type TextMatchPart, Textarea, type TextareaProps, Toast, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, ToastViewport, Toaster, Toolbar, ToolbarGroup, ToolbarSpacer, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type UseAutosaveOptions, type UseFormDirtyResult, badgeVariants, buttonVariants, cn, formSnapshot, getTextMatchParts, toast, useAutosave, useDebouncedValue, useFormDirty, useFormFeedback, useSidebar, useToast };
513
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, type AlertProps, AlertTitle, AppShell, type AppShellBreakpoint, AppShellContent, type AppShellContentProps, AppShellHeader, AppShellMain, AppShellMobileHeader, type AppShellProps, AppShellSidebar, AutocompleteCombobox, type AutocompleteComboboxProps, type AutosaveStatus, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, ButtonGroup, ButtonGroupText, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList, Command, CommandContent, CommandInput, CommandItem, CommandList, ConfirmDialog, type ConfirmDialogProps, Drawer, DrawerDescription, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, EmptyStateDescription, EmptyStateTitle, Field, FieldDescription, FieldError, FieldLabel, FormFeedback, type FormFeedbackProps, type FormFeedbackState, FormRow, type FormRowProps, HighlightMatch, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, Kbd, KbdGroup, Label, type LabelProps, LoadingOverlay, Menu, MenuContent, MenuItem, MenuTrigger, ModalDialog, type ModalDialogProps, PageHeader, PageHeaderActions, PageHeaderDescription, PageHeaderHeading, PageHeaderTitle, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverProps, PopoverTrigger, QuantityInput, type QuantityInputProps, SearchClearButton, SearchField, SearchInput, Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarHeader, SidebarItem, type SidebarItemProps, SidebarMore, SidebarProvider, SidebarRail, SidebarSearch, SidebarSeparator, SidebarTrigger, Skeleton, SubmitButton, type SubmitButtonProps, Switch, type SwitchProps, type TabPanelProps, type TabProps, Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsPanels, type TabsProps, TabsTrigger, type TextMatchPart, Textarea, type TextareaProps, Toast, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, ToastViewport, Toaster, Toolbar, ToolbarGroup, ToolbarSpacer, Tooltip, TooltipContent, type TooltipProps, TooltipTrigger, type UseAutosaveOptions, type UseFormDirtyResult, badgeVariants, buttonVariants, cn, formSnapshot, getTextMatchParts, toast, useAutosave, useDebouncedValue, useFormDirty, useFormFeedback, useSidebar, useToast };