@arbidocs/react 0.4.71 → 0.4.72
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/annotations/index.cjs +48 -48
- package/dist/annotations/index.js +2 -2
- package/dist/artifacts/index.cjs +7 -7
- package/dist/artifacts/index.js +2 -2
- package/dist/{chunk-6TFD5OS5.cjs → chunk-GE5TAR7Y.cjs} +3 -2
- package/dist/chunk-GE5TAR7Y.cjs.map +1 -0
- package/dist/{chunk-3QF5DNAP.js → chunk-IHTBAY57.js} +3 -3
- package/dist/{chunk-3QF5DNAP.js.map → chunk-IHTBAY57.js.map} +1 -1
- package/dist/{chunk-6ERJUIMQ.js → chunk-IQ5TYPVU.js} +3 -2
- package/dist/chunk-IQ5TYPVU.js.map +1 -0
- package/dist/{chunk-ULU5LEWF.cjs → chunk-L2PXZWJM.cjs} +25 -25
- package/dist/{chunk-ULU5LEWF.cjs.map → chunk-L2PXZWJM.cjs.map} +1 -1
- package/dist/{chunk-V4CXOPLB.js → chunk-MHCN7OST.js} +19 -7
- package/dist/{chunk-V4CXOPLB.js.map → chunk-MHCN7OST.js.map} +1 -1
- package/dist/{chunk-BTRIS3HY.cjs → chunk-QJRP2LLQ.cjs} +19 -6
- package/dist/chunk-QJRP2LLQ.cjs.map +1 -0
- package/dist/{chunk-LQ5YHB7W.cjs → chunk-WYZJLZ67.cjs} +6 -4
- package/dist/chunk-WYZJLZ67.cjs.map +1 -0
- package/dist/{chunk-WS6DF5X4.js → chunk-YNNAJJ5Z.js} +6 -4
- package/dist/chunk-YNNAJJ5Z.js.map +1 -0
- package/dist/document-tools/index.cjs +6 -6
- package/dist/document-tools/index.js +3 -3
- package/dist/{index-BWv_FKi3.d.cts → index-BVMBElCu.d.cts} +82 -1
- package/dist/{index-BWv_FKi3.d.ts → index-BVMBElCu.d.ts} +82 -1
- package/dist/index.cjs +629 -314
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +202 -4
- package/dist/index.d.ts +202 -4
- package/dist/index.js +313 -11
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +129 -125
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +4 -3
- package/dist/chunk-6ERJUIMQ.js.map +0 -1
- package/dist/chunk-6TFD5OS5.cjs.map +0 -1
- package/dist/chunk-BTRIS3HY.cjs.map +0 -1
- package/dist/chunk-LQ5YHB7W.cjs.map +0 -1
- package/dist/chunk-WS6DF5X4.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/button.tsx","../src/lib/toast-interaction.ts","../src/ui/dialog.tsx"],"names":["cva","React","Slot","jsx","cn","DialogPrimitive","usePortalContainer","React2","jsxs","X"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAM,cAAA,GAAiBA,0BAAA;AAAA,EACrB,yVAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA;AAAA,MAGR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,wDAAA;AAAA,QACT,MAAA,EAAQ,8DAAA;AAAA,QACR,WAAA,EAAa,oEAAA;AAAA,QACb,OAAA,EAAS,mDAAA;AAAA,QACT,SAAA,EAAW,4CAAA;AAAA,QACX,KAAA,EAAO,gBAAA;AAAA,QACP,IAAA,EAAM;AAAA,OACR;AAAA;AAAA;AAAA;AAAA,MAIA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,oCAAA;AAAA,QACT,EAAA,EAAI,kEAAA;AAAA,QACJ,EAAA,EAAI,2CAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAOA,IAAM,MAAA,GAAeC,iBAAA,CAAA,UAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,OAA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GAAG;AAAA;AACN,CACD;AACD,iBAAA,CAAkB,cAA8BC,0BAAA,CAAA,WAAA,CAAY,WAAA","file":"chunk-LQ5YHB7W.cjs","sourcesContent":["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst 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-3 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n // One filled primary per view; everything else is tonal, hairline or ghost. No\n // static shadows: separation is tone, and shadows are reserved for floating layers.\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n accent: 'bg-ai-accent text-ai-accent-foreground hover:bg-ai-accent/90',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline: 'border border-border bg-background hover:bg-muted',\n secondary: 'bg-muted text-foreground hover:bg-muted/70',\n ghost: 'hover:bg-muted',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n // Touch screens get a 44px target (coarse pointers only), mouse keeps the compact 36px.\n // `!` so the floor also wins over a caller's compact `h-7` or a container's\n // `[&_button]:h-7` rule: a compact toolbar on a phone must still be tappable.\n size: {\n default: 'h-9 px-4 py-2 pointer-coarse:h-11!',\n sm: 'h-8 rounded-md px-3 pointer-coarse:h-11! pointer-coarse:min-w-11',\n lg: 'h-10 rounded-md px-8 pointer-coarse:h-12!',\n icon: 'h-9 w-9 pointer-coarse:h-11! pointer-coarse:w-11!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.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\nexport { Button, buttonVariants }\n","/**\n * True when an interaction landed on a sonner toast. The toaster renders in its own\n * portal, outside every dialog, so Radix counts a click (or the focus move from\n * clicking a toast's close button) as an \"outside\" interaction and dismisses the open\n * dialog — e.g. clicking the \"Welcome\" toast closed the create-workspace dialog\n * underneath it.\n */\nexport function isToastInteraction(event: Event): boolean {\n const original = (event as CustomEvent<{ originalEvent?: Event }>).detail?.originalEvent\n const target = original?.target ?? event.target\n return target instanceof Element && target.closest('[data-sonner-toaster]') !== null\n}\n","import * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\nimport { isToastInteraction } from '../lib/toast-interaction'\nimport { usePortalContainer } from './portal-container'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\n/** Portals to the nearest PortalContainerProvider's container (a popped-out window), else `<body>`. */\nfunction DialogPortal({\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n const fallback = usePortalContainer()\n return <DialogPrimitive.Portal container={container ?? fallback} {...props} />\n}\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\n/**\n * Where the dialog sits on a PHONE (< 640px). Wider screens always get a centred dialog.\n * - `center`: centred box with a 1rem margin (small prompts and confirmations).\n * - `sheet`: bottom sheet, full width, rounded top corners (forms and pickers).\n * - `full`: full-height sheet that stops below the status bar (large editors, wizards).\n */\nexport type DialogPresentation = 'center' | 'sheet' | 'full' | 'right'\n\nconst PHONE_PRESENTATION: Record<DialogPresentation, string> = {\n right:\n 'inset-y-0 left-auto right-0 h-dvh max-h-dvh w-full max-w-[28rem] translate-x-0 translate-y-0 rounded-none border-y-0 border-r-0 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right data-[state=open]:zoom-in-100 data-[state=closed]:zoom-out-100',\n center: '',\n sheet:\n 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:max-w-full max-sm:border-x-0 max-sm:border-b-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-2.5rem)] max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n full: 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:border-x-0 max-sm:border-b-0 max-sm:h-[calc(100dvh-env(safe-area-inset-top,0px)-1rem)] max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-none max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n}\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n hideCloseButton?: boolean\n /** Phone presentation (see {@link DialogPresentation}). Defaults to `center`. */\n presentation?: DialogPresentation\n }\n>(\n (\n { className, children, hideCloseButton, presentation = 'center', onInteractOutside, ...props },\n ref\n ) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n data-slot=\"dialog-content\"\n data-presentation={presentation}\n onInteractOutside={(event) => {\n if (isToastInteraction(event)) event.preventDefault()\n onInteractOutside?.(event)\n }}\n className={cn(\n // Always inside the viewport: width and height are capped by the DYNAMIC viewport (mobile\n // browser chrome) and the notch / home-indicator insets; the content scrolls inside.\n 'fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px))] max-w-lg max-h-[calc(min(100dvh,100svh,100vh)-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] translate-x-[-50%] translate-y-[-50%] will-change-transform grid-cols-[minmax(0,1fr)] gap-4 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-themed border bg-background p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-md',\n PHONE_PRESENTATION[presentation],\n className\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <DialogPrimitive.Close\n // `fixed` inside the transformed dialog is positioned against the dialog box, not its\n // scrolling content: the close button never scrolls away.\n className=\"fixed right-4 top-4 z-20 inline-flex items-center justify-center rounded-sm pointer-coarse:right-2 pointer-coarse:top-2 pointer-coarse:size-11 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\"\n data-testid=\"dialog-close-button\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close dialog</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex min-w-0 flex-col space-y-1.5 pr-8 text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n // Sticks to the bottom of a scrolling dialog so the actions stay reachable.\n 'sticky bottom-0 z-10 -mx-6 -mb-6 flex flex-col-reverse gap-2 bg-background px-6 pb-6 pt-3 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('break-words text-lg font-semibold leading-tight tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.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 = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/button.tsx","../src/lib/toast-interaction.ts","../src/ui/dialog.tsx"],"names":["React","jsx"],"mappings":";;;;;;;;;AAMA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,yVAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA;AAAA;AAAA,MAGR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,wDAAA;AAAA,QACT,MAAA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1BA,GAAAA;AAAA,EAAiB,eAAA,CAAA,KAAA;AAAA,EAAhB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,gEAAA,EAAkE,SAAS,CAAA;AAAA,IACxF,GAAG;AAAA;AACN,CACD;AACD,WAAA,CAAY,cAA8B,eAAA,CAAA,KAAA,CAAM,WAAA;AAEhD,IAAM,iBAAA,GAA0B,kBAG9B,CAAC,EAAE,WAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC1BA,GAAAA;AAAA,EAAiB,eAAA,CAAA,WAAA;AAAA,EAAhB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,iBAAA,CAAkB,cAA8B,eAAA,CAAA,WAAA,CAAY,WAAA","file":"chunk-WS6DF5X4.js","sourcesContent":["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst 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-3 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n // One filled primary per view; everything else is tonal, hairline or ghost. No\n // static shadows: separation is tone, and shadows are reserved for floating layers.\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n accent: 'bg-ai-accent text-ai-accent-foreground hover:bg-ai-accent/90',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline: 'border border-border bg-background hover:bg-muted',\n secondary: 'bg-muted text-foreground hover:bg-muted/70',\n ghost: 'hover:bg-muted',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n // Touch screens get a 44px target (coarse pointers only), mouse keeps the compact 36px.\n // `!` so the floor also wins over a caller's compact `h-7` or a container's\n // `[&_button]:h-7` rule: a compact toolbar on a phone must still be tappable.\n size: {\n default: 'h-9 px-4 py-2 pointer-coarse:h-11!',\n sm: 'h-8 rounded-md px-3 pointer-coarse:h-11! pointer-coarse:min-w-11',\n lg: 'h-10 rounded-md px-8 pointer-coarse:h-12!',\n icon: 'h-9 w-9 pointer-coarse:h-11! pointer-coarse:w-11!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n)\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nconst Button = React.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\nexport { Button, buttonVariants }\n","/**\n * True when an interaction landed on a sonner toast. The toaster renders in its own\n * portal, outside every dialog, so Radix counts a click (or the focus move from\n * clicking a toast's close button) as an \"outside\" interaction and dismisses the open\n * dialog — e.g. clicking the \"Welcome\" toast closed the create-workspace dialog\n * underneath it.\n */\nexport function isToastInteraction(event: Event): boolean {\n const original = (event as CustomEvent<{ originalEvent?: Event }>).detail?.originalEvent\n const target = original?.target ?? event.target\n return target instanceof Element && target.closest('[data-sonner-toaster]') !== null\n}\n","import * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\n\nimport { cn } from '../lib/utils'\nimport { isToastInteraction } from '../lib/toast-interaction'\nimport { usePortalContainer } from './portal-container'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\n/** Portals to the nearest PortalContainerProvider's container (a popped-out window), else `<body>`. */\nfunction DialogPortal({\n container,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n const fallback = usePortalContainer()\n return <DialogPrimitive.Portal container={container ?? fallback} {...props} />\n}\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\n/**\n * Where the dialog sits on a PHONE (< 640px). Wider screens always get a centred dialog.\n * - `center`: centred box with a 1rem margin (small prompts and confirmations).\n * - `sheet`: bottom sheet, full width, rounded top corners (forms and pickers).\n * - `full`: full-height sheet that stops below the status bar (large editors, wizards).\n */\nexport type DialogPresentation = 'center' | 'sheet' | 'full' | 'right'\n\nconst PHONE_PRESENTATION: Record<DialogPresentation, string> = {\n right:\n 'inset-y-0 left-auto right-0 h-dvh max-h-dvh w-full max-w-[28rem] translate-x-0 translate-y-0 rounded-none border-y-0 border-r-0 data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right data-[state=open]:zoom-in-100 data-[state=closed]:zoom-out-100',\n center: '',\n sheet:\n 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:max-w-full max-sm:border-x-0 max-sm:border-b-0 max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-[calc(100dvh-env(safe-area-inset-top,0px)-2.5rem)] max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n full: 'max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:border-x-0 max-sm:border-b-0 max-sm:h-[calc(100dvh-env(safe-area-inset-top,0px)-1rem)] max-sm:w-full max-sm:max-w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:max-h-none max-sm:data-[state=open]:slide-in-from-bottom-10 max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:zoom-out-100',\n}\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n hideCloseButton?: boolean\n /** Phone presentation (see {@link DialogPresentation}). Defaults to `center`. */\n presentation?: DialogPresentation\n }\n>(\n (\n { className, children, hideCloseButton, presentation = 'center', onInteractOutside, ...props },\n ref\n ) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n data-slot=\"dialog-content\"\n data-presentation={presentation}\n onInteractOutside={(event) => {\n if (isToastInteraction(event)) event.preventDefault()\n onInteractOutside?.(event)\n }}\n className={cn(\n // Always inside the viewport: width and height are capped by the DYNAMIC viewport (mobile\n // browser chrome) and the notch / home-indicator insets; the content scrolls inside.\n 'fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem-env(safe-area-inset-left,0px)-env(safe-area-inset-right,0px))] max-w-lg max-h-[calc(min(100dvh,100svh,100vh)-2rem-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px))] translate-x-[-50%] translate-y-[-50%] will-change-transform grid-cols-[minmax(0,1fr)] gap-4 overflow-x-hidden overflow-y-auto overscroll-contain scrollbar-themed border bg-background p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-md',\n PHONE_PRESENTATION[presentation],\n className\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <DialogPrimitive.Close\n // `fixed` inside the transformed dialog is positioned against the dialog box, not its\n // scrolling content: the close button never scrolls away.\n className=\"fixed right-4 top-4 z-20 inline-flex items-center justify-center rounded-sm pointer-coarse:right-2 pointer-coarse:top-2 pointer-coarse:size-11 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\"\n data-testid=\"dialog-close-button\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close dialog</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex min-w-0 flex-col space-y-1.5 pr-8 text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n // Sticks to the bottom of a scrolling dialog so the actions stay reachable.\n 'sticky bottom-0 z-10 -mx-6 -mb-6 flex flex-col-reverse gap-2 bg-background px-6 pb-6 pt-3 sm:flex-row sm:justify-end',\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('break-words text-lg font-semibold leading-tight tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.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 = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
|