@ngrok/mantle 0.60.2 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.js +1 -1
- package/dist/accordion.js.map +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/anchor.js +1 -1
- package/dist/anchor.js.map +1 -1
- package/dist/auto-scroll-to-hash.js +1 -1
- package/dist/auto-scroll-to-hash.js.map +1 -1
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/calendar.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/{chunk-GYPSB3OK.js → chunk-7MJQGBE4.js} +1 -1
- package/dist/chunk-7MJQGBE4.js.map +1 -0
- package/dist/{chunk-PEGWGFY7.js → chunk-B2CXQETQ.js} +1 -1
- package/dist/chunk-B2CXQETQ.js.map +1 -0
- package/dist/{chunk-JATU64S7.js → chunk-ERCBHCUY.js} +2 -2
- package/dist/chunk-ERCBHCUY.js.map +1 -0
- package/dist/{chunk-X7RUBITL.js → chunk-GLSHD37P.js} +1 -1
- package/dist/chunk-GLSHD37P.js.map +1 -0
- package/dist/{chunk-UGWSBMHH.js → chunk-HG2MWNPU.js} +2 -2
- package/dist/chunk-HG2MWNPU.js.map +1 -0
- package/dist/{chunk-2PHWBRBD.js → chunk-HL2HWYKP.js} +2 -2
- package/dist/{chunk-2PHWBRBD.js.map → chunk-HL2HWYKP.js.map} +1 -1
- package/dist/{chunk-YKYEISYH.js → chunk-LURP5WQR.js} +2 -2
- package/dist/{chunk-YKYEISYH.js.map → chunk-LURP5WQR.js.map} +1 -1
- package/dist/{chunk-OE4YWO7O.js → chunk-NQZYWYVH.js} +2 -2
- package/dist/chunk-NQZYWYVH.js.map +1 -0
- package/dist/{chunk-UNFO4DZV.js → chunk-ODDNPNLN.js} +1 -1
- package/dist/chunk-ODDNPNLN.js.map +1 -0
- package/dist/{chunk-3C5O3AQA.js → chunk-OP6JMBKJ.js} +1 -1
- package/dist/{chunk-3C5O3AQA.js.map → chunk-OP6JMBKJ.js.map} +1 -1
- package/dist/{chunk-BR4ZHK5A.js → chunk-RLW7NBZU.js} +2 -2
- package/dist/chunk-RLW7NBZU.js.map +1 -0
- package/dist/{chunk-2NIR7PCL.js → chunk-SBVSECWW.js} +1 -1
- package/dist/{chunk-2NIR7PCL.js.map → chunk-SBVSECWW.js.map} +1 -1
- package/dist/{chunk-M6TUHYJA.js → chunk-SK2YHT6N.js} +2 -2
- package/dist/{chunk-M6TUHYJA.js.map → chunk-SK2YHT6N.js.map} +1 -1
- package/dist/{chunk-V4TWM6RF.js → chunk-SMYI7SUP.js} +1 -1
- package/dist/{chunk-V4TWM6RF.js.map → chunk-SMYI7SUP.js.map} +1 -1
- package/dist/{chunk-STC52KT6.js → chunk-U5GD6FHU.js} +1 -1
- package/dist/chunk-U5GD6FHU.js.map +1 -0
- package/dist/chunk-Y7RHMF43.js +2 -0
- package/dist/chunk-Y7RHMF43.js.map +1 -0
- package/dist/{chunk-3AUCEZTZ.js → chunk-ZCTK5X4D.js} +2 -2
- package/dist/{chunk-3AUCEZTZ.js.map → chunk-ZCTK5X4D.js.map} +1 -1
- package/dist/code-block.js +1 -1
- package/dist/code-block.js.map +1 -1
- package/dist/color.js.map +1 -1
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/command.js +1 -1
- package/dist/command.js.map +1 -1
- package/dist/data-table.d.ts +2 -2
- package/dist/data-table.js +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{direction-veAOo2is.d.ts → direction-DHheuUag.d.ts} +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/flag.js +1 -1
- package/dist/flag.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/label.js +1 -1
- package/dist/label.js.map +1 -1
- package/dist/mantle.css +206 -241
- package/dist/media-object.js +1 -1
- package/dist/media-object.js.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/sandboxed-on-click.d.ts +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/sandboxed-on-click.js.map +1 -1
- package/dist/select.js +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/slot.js +1 -1
- package/dist/sorting.d.ts +1 -1
- package/dist/sorting.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/switch.js.map +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +1 -1
- package/dist/{themes-Jy9DUcQe.d.ts → themes-Bi46K9ZW.d.ts} +1 -1
- package/dist/toast.d.ts +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +165 -165
- package/dist/chunk-BR4ZHK5A.js.map +0 -1
- package/dist/chunk-GC6NS32Q.js +0 -2
- package/dist/chunk-GC6NS32Q.js.map +0 -1
- package/dist/chunk-GYPSB3OK.js.map +0 -1
- package/dist/chunk-JATU64S7.js.map +0 -1
- package/dist/chunk-OE4YWO7O.js.map +0 -1
- package/dist/chunk-PEGWGFY7.js.map +0 -1
- package/dist/chunk-STC52KT6.js.map +0 -1
- package/dist/chunk-UGWSBMHH.js.map +0 -1
- package/dist/chunk-UNFO4DZV.js.map +0 -1
- package/dist/chunk-X7RUBITL.js.map +0 -1
package/dist/sheet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/sheet/sheet.tsx"],"sourcesContent":["import { XIcon } from \"@phosphor-icons/react/X\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type {\n\tComponentPropsWithoutRef,\n\tComponentRef,\n\tHTMLAttributes,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport * as SheetPrimitive from \"../dialog/primitive.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\n/**\n * The root component for a `Sheet`. Should compose the `Sheet.Trigger` and `Sheet.Content`.\n * Acts as a stateful provider for the Sheet's open/closed state.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Root = SheetPrimitive.Root;\nRoot.displayName = \"Sheet\";\n\n/**\n * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n *\n * @example\n * ```tsx\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Trigger = SheetPrimitive.Trigger;\nTrigger.displayName = \"SheetTrigger\";\n\n/**\n * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.\n * Usually contained within the `Sheet.Footer` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n *\n * @example\n * ```tsx\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Close = SheetPrimitive.Close;\nClose.displayName = \"SheetClose\";\n\n/**\n * The portal for a sheet. Should be rendered as a child of the `Sheet` component.\n * Renders a portal that the `SheetOverlay` and `Sheet.Content` is rendered into.\n *\n * @private\n */\nconst SheetPortal = SheetPrimitive.Portal;\nSheetPortal.displayName = \"SheetPortal\";\n\n/**\n * The overlay backdrop for a sheet. Should be rendered as a child of the `SheetPortal` component.\n *\n * You likely don't need to use this component directly, as it is used internally by the `Sheet.Content` component.\n *\n * @private\n */\nconst SheetOverlay = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-40 backdrop-blur-xs\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst SheetVariants = cva(\n\t\"bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * The side of the screen the sheet should slide in from.\n\t\t\t */\n\t\t\tside: {\n\t\t\t\tleft: \"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r\",\n\t\t\t\tright:\n\t\t\t\t\t\"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ntype SheetContentProps = ComponentPropsWithoutRef<\n\ttypeof SheetPrimitive.Content\n> &\n\tVariantProps<typeof SheetVariants> & {\n\t\t/**\n\t\t * The preferred width of the `Sheet.Content` as a tailwind `max-w-` class.\n\t\t *\n\t\t * By default, a `Sheet`'s content width is responsive with a default\n\t\t * preferred width: the maximum width of the `Sheet.Content` when the window\n\t\t * viewport is larger than the mobile breakpoint (`sm`).\n\t\t *\n\t\t * @default `sm:max-w-[30rem]`\n\t\t */\n\t\tpreferredWidth?: `sm:max-w-${string}`;\n\t};\n\n/**\n * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders on top of the overlay backdrop.\n * Should contain the `Sheet.Header`, `Sheet.Body`, and `Sheet.Footer`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Content = forwardRef<ComponentRef<\"div\">, SheetContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"sm:max-w-[30rem]\",\n\t\t\tside = \"right\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Content\n\t\t\t\tclassName={cx(SheetVariants({ side }), preferredWidth, className)}\n\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SheetPrimitive.Content>\n\t\t</SheetPortal>\n\t),\n);\nContent.displayName = SheetPrimitive.Content.displayName;\n\ntype SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\n\n/**\n * An icon button that closes the `Sheet` when clicked.\n * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst CloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Sheet\",\n\tappearance = \"ghost\",\n\t...props\n}: SheetCloseIconButtonProps) => (\n\t<SheetPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</SheetPrimitive.Close>\n);\nCloseIconButton.displayName = \"SheetCloseIconButton\";\n\n/**\n * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Body = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)}\n\t\t{...props}\n\t/>\n);\nBody.displayName = \"SheetBody\";\n\n/**\n * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Header = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nHeader.displayName = \"SheetHeader\";\n\n/**\n * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Footer = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nFooter.displayName = \"SheetFooter\";\n\n/**\n * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Title = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong flex-1 truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nTitle.displayName = SheetPrimitive.Title.displayName;\n\n/**\n * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst TitleGroup = forwardRef<\n\tComponentRef<\"div\">,\n\tHTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n\t<div\n\t\tclassName={cx(\"flex items-center justify-between gap-2\", className)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t{children}\n\t</div>\n));\nTitleGroup.displayName = \"SheetTitleGroup\";\n\n/**\n * A description for a sheet. Typically rendered as a child of `Sheet.Header`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Description = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nDescription.displayName = SheetPrimitive.Description.displayName;\n\n/**\n * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Actions = forwardRef<ComponentRef<\"div\">, HTMLAttributes<HTMLDivElement>>(\n\t({ children, className, ...props }, ref) => (\n\t\t<div\n\t\t\tclassName={cx(\"flex h-full items-center gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nActions.displayName = \"SheetActions\";\n\n/**\n * A container that overlays the current view from the edge of the screen.\n * It is a lightweight way of allowing users to complete a task without losing\n * contextual information of the view beneath it.\n *\n * @see https://mantle.ngrok.com/components/sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Sheet = {\n\t/**\n\t * The root component for a `Sheet`. Should compose the `Sheet.Trigger` and `Sheet.Content`.\n\t * Acts as a stateful provider for the Sheet's open/closed state.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet\n\t *\n\t * @example\n\t * ```tsx\n\t * // Triggering a stateful sheet\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * ```\n\t */\n\tActions,\n\t/**\n\t * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tBody,\n\t/**\n\t * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.\n\t * Usually contained within the `Sheet.Footer` component.\n\t * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Footer>\n\t * <Sheet.Close asChild>\n\t * <Button type=\"button\">Close</Button>\n\t * </Sheet.Close>\n\t * </Sheet.Footer>\n\t * ```\n\t */\n\tClose,\n\t/**\n\t * An icon button that closes the `Sheet` when clicked.\n\t * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tCloseIconButton,\n\t/**\n\t * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n\t * Renders on top of the overlay backdrop.\n\t * Should contain the `Sheet.Header`, `Sheet.Body`, and `Sheet.Footer`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * A description for a sheet. Typically rendered as a child of `Sheet.Header`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * <Sheet.Description>\n\t * This action cannot be undone.\n\t * </Sheet.Description>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tDescription,\n\t/**\n\t * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * <Sheet.Footer>\n\t * <Sheet.Close asChild>\n\t * <Button type=\"button\">Close</Button>\n\t * </Sheet.Close>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Save\n\t * </Button>\n\t * </Sheet.Footer>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tFooter,\n\t/**\n\t * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * <Sheet.Description>\n\t * This action cannot be undone.\n\t * </Sheet.Description>\n\t * </Sheet.Header>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tHeader,\n\t/**\n\t * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n\t * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tTitle,\n\t/**\n\t * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tTitleGroup,\n\t/**\n\t * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n\t * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tSheet,\n};\n"],"mappings":"oeAAA,OAAS,SAAAA,MAAa,0BACtB,OAA4B,OAAAC,MAAW,2BAMvC,OAAS,cAAAC,MAAkB,QA4L1B,cAAAC,EA6GC,QAAAC,MA7GD,oBArFD,IAAMC,EAAsBA,EAC5BA,EAAK,YAAc,QA2BnB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GC,EACJ,IAAKC,EAEJ,SAAAM,EACF,CAEF,EACAoB,EAAQ,YAAc,eAoGtB,IAAMC,EAAQ,CA6Bb,KAAApC,EAgBA,QAAAmC,EAwBA,KAAAN,EAiBA,MAAA3B,EAmBA,gBAAAoB,EAgCA,QAAAR,EAqBA,YAAAoB,EAgCA,OAAAH,EAwBA,OAAAD,EAmBA,MAAAE,EAkBA,WAAAC,EAqBA,QAAAhC,CACD","names":["XIcon","cva","forwardRef","jsx","jsxs","Root","Trigger","Close","SheetPortal","Portal","SheetOverlay","forwardRef","className","props","ref","Overlay","cx","SheetVariants","cva","Content","children","onInteractOutside","onPointerDownOutside","preferredWidth","side","event","preventCloseOnPromptInteraction","CloseIconButton","size","type","label","appearance","IconButton","XIcon","Body","Header","Footer","Title","TitleGroup","Description","Actions","Sheet"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/sheet/sheet.tsx"],"sourcesContent":["import { XIcon } from \"@phosphor-icons/react/X\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type { ComponentPropsWithoutRef, ComponentRef, HTMLAttributes } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport * as SheetPrimitive from \"../dialog/primitive.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\n/**\n * The root component for a `Sheet`. Should compose the `Sheet.Trigger` and `Sheet.Content`.\n * Acts as a stateful provider for the Sheet's open/closed state.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Root = SheetPrimitive.Root;\nRoot.displayName = \"Sheet\";\n\n/**\n * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n *\n * @example\n * ```tsx\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Trigger = SheetPrimitive.Trigger;\nTrigger.displayName = \"SheetTrigger\";\n\n/**\n * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.\n * Usually contained within the `Sheet.Footer` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n *\n * @example\n * ```tsx\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Close = SheetPrimitive.Close;\nClose.displayName = \"SheetClose\";\n\n/**\n * The portal for a sheet. Should be rendered as a child of the `Sheet` component.\n * Renders a portal that the `SheetOverlay` and `Sheet.Content` is rendered into.\n *\n * @private\n */\nconst SheetPortal = SheetPrimitive.Portal;\nSheetPortal.displayName = \"SheetPortal\";\n\n/**\n * The overlay backdrop for a sheet. Should be rendered as a child of the `SheetPortal` component.\n *\n * You likely don't need to use this component directly, as it is used internally by the `Sheet.Content` component.\n *\n * @private\n */\nconst SheetOverlay = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-40 backdrop-blur-xs\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst SheetVariants = cva(\n\t\"bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * The side of the screen the sheet should slide in from.\n\t\t\t */\n\t\t\tside: {\n\t\t\t\tleft: \"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r\",\n\t\t\t\tright:\n\t\t\t\t\t\"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ntype SheetContentProps = ComponentPropsWithoutRef<typeof SheetPrimitive.Content> &\n\tVariantProps<typeof SheetVariants> & {\n\t\t/**\n\t\t * The preferred width of the `Sheet.Content` as a tailwind `max-w-` class.\n\t\t *\n\t\t * By default, a `Sheet`'s content width is responsive with a default\n\t\t * preferred width: the maximum width of the `Sheet.Content` when the window\n\t\t * viewport is larger than the mobile breakpoint (`sm`).\n\t\t *\n\t\t * @default `sm:max-w-[30rem]`\n\t\t */\n\t\tpreferredWidth?: `sm:max-w-${string}`;\n\t};\n\n/**\n * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders on top of the overlay backdrop.\n * Should contain the `Sheet.Header`, `Sheet.Body`, and `Sheet.Footer`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Content = forwardRef<ComponentRef<\"div\">, SheetContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"sm:max-w-[30rem]\",\n\t\t\tside = \"right\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Content\n\t\t\t\tclassName={cx(SheetVariants({ side }), preferredWidth, className)}\n\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SheetPrimitive.Content>\n\t\t</SheetPortal>\n\t),\n);\nContent.displayName = SheetPrimitive.Content.displayName;\n\ntype SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\n\n/**\n * An icon button that closes the `Sheet` when clicked.\n * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst CloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Sheet\",\n\tappearance = \"ghost\",\n\t...props\n}: SheetCloseIconButtonProps) => (\n\t<SheetPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</SheetPrimitive.Close>\n);\nCloseIconButton.displayName = \"SheetCloseIconButton\";\n\n/**\n * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Body = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div className={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)} {...props} />\n);\nBody.displayName = \"SheetBody\";\n\n/**\n * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Header = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nHeader.displayName = \"SheetHeader\";\n\n/**\n * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n * Should be rendered as a child of `Sheet.Content`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Footer = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nFooter.displayName = \"SheetFooter\";\n\n/**\n * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Title = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong flex-1 truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nTitle.displayName = SheetPrimitive.Title.displayName;\n\n/**\n * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst TitleGroup = forwardRef<ComponentRef<\"div\">, HTMLAttributes<HTMLDivElement>>(\n\t({ children, className, ...props }, ref) => (\n\t\t<div className={cx(\"flex items-center justify-between gap-2\", className)} {...props} ref={ref}>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nTitleGroup.displayName = \"SheetTitleGroup\";\n\n/**\n * A description for a sheet. Typically rendered as a child of `Sheet.Header`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Description = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description ref={ref} className={cx(\"text-body text-sm\", className)} {...props} />\n));\nDescription.displayName = SheetPrimitive.Description.displayName;\n\n/**\n * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Actions = forwardRef<ComponentRef<\"div\">, HTMLAttributes<HTMLDivElement>>(\n\t({ children, className, ...props }, ref) => (\n\t\t<div className={cx(\"flex h-full items-center gap-2\", className)} {...props} ref={ref}>\n\t\t\t{children}\n\t\t</div>\n\t),\n);\nActions.displayName = \"SheetActions\";\n\n/**\n * A container that overlays the current view from the edge of the screen.\n * It is a lightweight way of allowing users to complete a task without losing\n * contextual information of the view beneath it.\n *\n * @see https://mantle.ngrok.com/components/sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet.Root>\n * <Sheet.Trigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </Sheet.Trigger>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <Sheet.Content>\n * <Sheet.Header>\n * <Sheet.TitleGroup>\n * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n * <Sheet.Actions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <Sheet.CloseIconButton />\n * </Sheet.Actions>\n * </Sheet.TitleGroup>\n * <Sheet.Description>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </Sheet.Description>\n * </Sheet.Header>\n * <Sheet.Body>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </Sheet.Body>\n * <Sheet.Footer>\n * <Sheet.Close asChild>\n * <Button type=\"button\">Close</Button>\n * </Sheet.Close>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </Sheet.Footer>\n * </Sheet.Content>\n * </Sheet.Root>\n * ```\n */\nconst Sheet = {\n\t/**\n\t * The root component for a `Sheet`. Should compose the `Sheet.Trigger` and `Sheet.Content`.\n\t * Acts as a stateful provider for the Sheet's open/closed state.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet\n\t *\n\t * @example\n\t * ```tsx\n\t * // Triggering a stateful sheet\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Are you absolutely sure?</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * ```\n\t */\n\tActions,\n\t/**\n\t * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tBody,\n\t/**\n\t * The close button for a `Sheet`. Should be rendered as a child of the `Sheet.Content` component.\n\t * Usually contained within the `Sheet.Footer` component.\n\t * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Footer>\n\t * <Sheet.Close asChild>\n\t * <Button type=\"button\">Close</Button>\n\t * </Sheet.Close>\n\t * </Sheet.Footer>\n\t * ```\n\t */\n\tClose,\n\t/**\n\t * An icon button that closes the `Sheet` when clicked.\n\t * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tCloseIconButton,\n\t/**\n\t * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n\t * Renders on top of the overlay backdrop.\n\t * Should contain the `Sheet.Header`, `Sheet.Body`, and `Sheet.Footer`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * A description for a sheet. Typically rendered as a child of `Sheet.Header`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * <Sheet.Description>\n\t * This action cannot be undone.\n\t * </Sheet.Description>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tDescription,\n\t/**\n\t * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * <Sheet.Body>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Body>\n\t * <Sheet.Footer>\n\t * <Sheet.Close asChild>\n\t * <Button type=\"button\">Close</Button>\n\t * </Sheet.Close>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Save\n\t * </Button>\n\t * </Sheet.Footer>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tFooter,\n\t/**\n\t * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n\t * Should be rendered as a child of `Sheet.Content`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Content>\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * <Sheet.Description>\n\t * This action cannot be undone.\n\t * </Sheet.Description>\n\t * </Sheet.Header>\n\t * </Sheet.Content>\n\t * ```\n\t */\n\tHeader,\n\t/**\n\t * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.\n\t * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tTitle,\n\t/**\n\t * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Header>\n\t * <Sheet.TitleGroup>\n\t * <Sheet.Title>Sheet Title</Sheet.Title>\n\t * <Sheet.Actions>\n\t * <Sheet.CloseIconButton />\n\t * </Sheet.Actions>\n\t * </Sheet.TitleGroup>\n\t * </Sheet.Header>\n\t * ```\n\t */\n\tTitleGroup,\n\t/**\n\t * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n\t * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n\t *\n\t * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Sheet.Root>\n\t * <Sheet.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"filled\">\n\t * Open Sheet\n\t * </Button>\n\t * </Sheet.Trigger>\n\t * <Sheet.Content>\n\t * <p>This is the sheet content.</p>\n\t * </Sheet.Content>\n\t * </Sheet.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport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AAqBJ,CAAS,EAAI,GAAGC,EAAO,CAChG,EACD0B,EAAY,YAA6BA,EAAY,YAkDrD,IAAMC,EAAU7B,EACf,CAAC,CAAE,SAAAS,EAAU,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACnCX,EAAC,OAAI,UAAWa,EAAG,iCAAkCJ,CAAS,EAAI,GAAGC,EAAO,IAAKC,EAC/E,SAAAM,EACF,CAEF,EACAoB,EAAQ,YAAc,eAoGtB,IAAMC,EAAQ,CA6Bb,KAAApC,EAgBA,QAAAmC,EAwBA,KAAAN,EAiBA,MAAA3B,EAmBA,gBAAAoB,EAgCA,QAAAR,EAqBA,YAAAoB,EAgCA,OAAAH,EAwBA,OAAAD,EAmBA,MAAAE,EAkBA,WAAAC,EAqBA,QAAAhC,CACD","names":["XIcon","cva","forwardRef","jsx","jsxs","Root","Trigger","Close","SheetPortal","Portal","SheetOverlay","forwardRef","className","props","ref","Overlay","cx","SheetVariants","cva","Content","children","onInteractOutside","onPointerDownOutside","preferredWidth","side","event","preventCloseOnPromptInteraction","CloseIconButton","size","type","label","appearance","IconButton","XIcon","Body","Header","Footer","Title","TitleGroup","Description","Actions","Sheet"]}
|
package/dist/skeleton.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-ODDNPNLN.js";import{a as o}from"./chunk-PFXFESEN.js";import{forwardRef as s}from"react";import{jsx as i}from"react/jsx-runtime";var t=s(({asChild:r=!1,className:n,...p},l)=>i(r?e:"div",{className:o("dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10",n),ref:l,...p}));t.displayName="Skeleton";export{t as Skeleton};
|
|
2
2
|
//# sourceMappingURL=skeleton.js.map
|
package/dist/skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/skeleton/skeleton.tsx"],"sourcesContent":["import { type ComponentProps, type ComponentRef, forwardRef } from \"react\";\nimport type { SelfClosingWithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Slot } from \"../slot/index.js\";\n\ntype Props = Exclude<ComponentProps<\"div\">, \"children\">
|
|
1
|
+
{"version":3,"sources":["../src/components/skeleton/skeleton.tsx"],"sourcesContent":["import { type ComponentProps, type ComponentRef, forwardRef } from \"react\";\nimport type { SelfClosingWithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Slot } from \"../slot/index.js\";\n\ntype Props = Exclude<ComponentProps<\"div\">, \"children\"> & SelfClosingWithAsChild;\n\n/**\n * A skeleton is a placeholder for content that is loading.\n * By using a skeleton, you can give the user an idea of what the content will\n * look like and reduce the perceived loading time and CLS (Cumulative Layout Shift).\n *\n * @note Default height is 1rem.\n *\n * @see https://mantle.ngrok.com/components/skeleton#api\n *\n * @example\n * ```tsx\n * <Skeleton className=\"w-1/2\" />\n *\n * <Skeleton className=\"w-1/2\" />\n *\n * <Skeleton className=\"h-12 w-12 rounded-full\" />\n * ```\n */\nconst Skeleton = forwardRef<ComponentRef<\"div\">, Props>(\n\t({ asChild = false, className, ...props }, ref) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"dark-high-contrast:bg-black/30 high-contrast:bg-black/30 h-4 animate-pulse rounded-md bg-gray-300/25 dark:bg-gray-950/10\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nSkeleton.displayName = \"Skeleton\";\n\nexport {\n\t//,\n\tSkeleton,\n};\n"],"mappings":"gFAAA,OAAiD,cAAAA,MAAkB,QA8BhE,cAAAC,MAAA,oBALH,IAAMC,EAAWC,EAChB,CAAC,CAAE,QAAAC,EAAU,GAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAIzCN,EAHiBG,EAAUI,EAAO,MAGjC,CACA,UAAWC,EACV,2HACAJ,CACD,EACA,IAAKE,EACJ,GAAGD,EACL,CAGH,EACAJ,EAAS,YAAc","names":["forwardRef","jsx","Skeleton","forwardRef","asChild","className","props","ref","Slot","cx"]}
|
package/dist/slot.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-ODDNPNLN.js";import"./chunk-PFXFESEN.js";export{a as Slot};
|
|
2
2
|
//# sourceMappingURL=slot.js.map
|
package/dist/sorting.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { $ as $alphanumericSortingDirection, a as $sortingDirection, b as $sortingMode, c as $timeSortingDirection, A as AlphanumericSortingDirection, S as SortingDirection,
|
|
1
|
+
export { $ as $alphanumericSortingDirection, a as $sortingDirection, b as $sortingMode, c as $timeSortingDirection, A as AlphanumericSortingDirection, S as SortingDirection, d as SortingMode, T as TimeSortingDirection, e as alphanumericSortingDirections, i as isAlphanumericSortingDirection, f as isSortingDirection, g as isSortingMode, h as isTimeSortingDirection, s as sortingDirections, j as sortingModes, t as timeSortingByDirection, k as timeSortingDirections } from './direction-DHheuUag.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Compare dates in newest-to-oldest (descending) order.
|
package/dist/sorting.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,b as o,c as r,d as n,e as s,f as c,g,h as m,i as D,j as a,k as p,l as S,m as u}from"./chunk-
|
|
1
|
+
import{a as t,b as o,c as r,d as n,e as s,f as c,g,h as m,i as D,j as a,k as p,l as S,m as u}from"./chunk-7MJQGBE4.js";function T(e,i){return Math.sign(i.getTime()-e.getTime())}function d(e,i){return Math.sign(e.getTime()-i.getTime())}export{D as $alphanumericSortingDirection,c as $sortingDirection,r as $sortingMode,u as $timeSortingDirection,g as alphanumericSortingDirections,T as compareDatesNewestToOldest,d as compareDatesOldestToNewest,m as isAlphanumericSortingDirection,s as isSortingDirection,o as isSortingMode,p as isTimeSortingDirection,n as sortingDirections,t as sortingModes,S as timeSortingByDirection,a as timeSortingDirections};
|
|
2
2
|
//# sourceMappingURL=sorting.js.map
|
package/dist/switch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-OP6JMBKJ.js";import{a as o}from"./chunk-PFXFESEN.js";import{Root as m,Thumb as p}from"@radix-ui/react-switch";import h from"clsx";import{forwardRef as u}from"react";import{jsx as r}from"react/jsx-runtime";var a=u(({"aria-readonly":n,className:s,readOnly:c,onClick:l,...d},f)=>{let t=i(c??n);return r(m,{"aria-readonly":t,className:o("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full outline-hidden","disabled:cursor-default disabled:opacity-50","focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4","data-state-checked:bg-blue-500 data-state-unchecked:bg-gray-400",s),onClick:e=>{if(t){e.preventDefault(),e.stopPropagation();return}l?.(e)},ref:f,...d,children:r(p,{className:h("pointer-events-none block size-4 rounded-full bg-[#fff] shadow-md ring-0 transition-transform","data-state-checked:translate-x-4.5 data-state-unchecked:translate-x-0.5")})})});a.displayName="Switch";export{a as Switch};
|
|
2
2
|
//# sourceMappingURL=switch.js.map
|
package/dist/switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/switch/switch.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../src/components/switch/switch.tsx"],"sourcesContent":["import { Root as SwitchPrimitiveRoot, Thumb as SwitchPrimitiveThumb } from \"@radix-ui/react-switch\";\nimport clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { parseBooleanish } from \"../../types/booleanish.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\ntype SwitchProps = ComponentPropsWithoutRef<typeof SwitchPrimitiveRoot> & {\n\t/**\n\t * Makes the switch immutable, meaning the user can not edit the control.\n\t */\n\treadOnly?: boolean;\n};\n\n/**\n * A form control that allows the user to toggle between checked and not checked.\n *\n * @see https://mantle.ngrok.com/components/switch#api-switch\n *\n * @example\n * ```tsx\n * <form>\n * <Label htmlFor=\"airplane-mode\" className=\"flex items-center gap-2\">\n * Airplane Mode\n * <Switch name=\"airplane-mode\" id=\"airplane-mode\" />\n * </Label>\n * </form>\n * ```\n */\nconst Switch = forwardRef<ComponentRef<typeof SwitchPrimitiveRoot>, SwitchProps>(\n\t({ \"aria-readonly\": _ariaReadOnly, className, readOnly: _readOnly, onClick, ...props }, ref) => {\n\t\tconst readOnly = parseBooleanish(_readOnly ?? _ariaReadOnly);\n\n\t\treturn (\n\t\t\t<SwitchPrimitiveRoot\n\t\t\t\taria-readonly={readOnly}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full outline-hidden\",\n\t\t\t\t\t\"disabled:cursor-default disabled:opacity-50\",\n\t\t\t\t\t\"focus-visible:border-accent-600 focus-visible:ring-focus-accent focus-visible:outline-hidden focus-visible:ring-4\",\n\t\t\t\t\t\"data-state-checked:bg-blue-500 data-state-unchecked:bg-gray-400\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (readOnly) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SwitchPrimitiveThumb\n\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\"pointer-events-none block size-4 rounded-full bg-[#fff] shadow-md ring-0 transition-transform\",\n\t\t\t\t\t\t\"data-state-checked:translate-x-4.5 data-state-unchecked:translate-x-0.5\",\n\t\t\t\t\t)}\n\t\t\t\t/>\n\t\t\t</SwitchPrimitiveRoot>\n\t\t);\n\t},\n);\nSwitch.displayName = \"Switch\";\n\nexport {\n\t//\n\tSwitch,\n};\n"],"mappings":"gFAAA,OAAS,QAAQA,EAAqB,SAASC,MAA4B,yBAC3E,OAAOC,MAAU,OACjB,OAAS,cAAAC,MAAkB,QAoDvB,cAAAC,MAAA,oBAzBJ,IAAMC,EAASC,EACd,CAAC,CAAE,gBAAiBC,EAAe,UAAAC,EAAW,SAAUC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAAQ,CAC/F,IAAMC,EAAWC,EAAgBL,GAAaF,CAAa,EAE3D,OACCH,EAACW,EAAA,CACA,gBAAeF,EACf,UAAWG,EACV,4FACA,8CACA,oHACA,kEACAR,CACD,EACA,QAAUS,GAAU,CACnB,GAAIJ,EAAU,CACbI,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MACD,CACAP,IAAUO,CAAK,CAChB,EACA,IAAKL,EACJ,GAAGD,EAEJ,SAAAP,EAACc,EAAA,CACA,UAAWC,EACV,gGACA,yEACD,EACD,EACD,CAEF,CACD,EACAd,EAAO,YAAc","names":["SwitchPrimitiveRoot","SwitchPrimitiveThumb","clsx","forwardRef","jsx","Switch","forwardRef","_ariaReadOnly","className","_readOnly","onClick","props","ref","readOnly","parseBooleanish","SwitchPrimitiveRoot","cx","event","SwitchPrimitiveThumb","clsx"]}
|
package/dist/table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-U5GD6FHU.js";import"./chunk-MF2QITTY.js";import"./chunk-PFXFESEN.js";export{e as Table};
|
|
2
2
|
//# sourceMappingURL=table.js.map
|
package/dist/tabs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-OP6JMBKJ.js";import{a as r}from"./chunk-PFXFESEN.js";import{Content as A,List as V,Root as w,Trigger as T}from"@radix-ui/react-tabs";import{cva as b}from"class-variance-authority";import S from"clsx";import{Children as W,cloneElement as O,createContext as B,forwardRef as n,isValidElement as E,useContext as m}from"react";import H from"tiny-invariant";import{Fragment as J,jsx as i,jsxs as h}from"react/jsx-runtime";var c=B({orientation:"horizontal",appearance:"classic"}),x=n(({className:t,children:a,orientation:e="horizontal",appearance:o="classic",...s},p)=>i(w,{className:r("flex gap-4",e==="horizontal"?"flex-col":"flex-row",t),orientation:e,ref:p,...s,children:i(c.Provider,{value:{orientation:e,appearance:o},children:a})}));x.displayName="Tabs";var M=b("flex border-gray-200",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-end gap-3.5 self-stretch"},appearance:{classic:"",pill:""}},compoundVariants:[{orientation:"horizontal",appearance:"pill",className:"gap-1"},{orientation:"horizontal",appearance:"classic",className:"gap-6 border-b"},{orientation:"vertical",appearance:"classic",className:"border-r"}]}),y=n(({className:t,...a},e)=>{let{orientation:o,appearance:s}=m(c);return i(V,{"aria-orientation":o,className:r(M({orientation:o,appearance:s}),t),ref:e,...a})});y.displayName="TabsList";var D=b("absolute z-0",{variants:{orientation:{horizontal:"-bottom-px left-0 right-0 h-0.75",vertical:"-right-px bottom-0 top-0 w-0.75"},appearance:{classic:"group-data-state-active/tab-trigger:bg-blue-600",pill:"hidden"}}}),d=()=>{let{orientation:t,appearance:a}=m(c);return i("span",{"aria-hidden":!0,className:S(D({orientation:t,appearance:a}))})};d.displayName="TabsTriggerDecoration";var k=b(r("group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600","ring-focus-accent outline-hidden","aria-disabled:cursor-default aria-disabled:opacity-50","focus-visible:ring-4","[&>svg]:shrink-0 [&>svg]:size-5","not-aria-disabled:hover:text-gray-900"),{variants:{orientation:{horizontal:"rounded-tl-md rounded-tr-md",vertical:"rounded-bl-md rounded-tl-md pr-3"},appearance:{classic:r("not-aria-disabled:hover:data-state-active:text-blue-600","data-state-active:text-blue-600"),pill:r("not-aria-disabled:hover:data-state-active:text-blue-700","not-aria-disabled:hover:data-state-active:bg-accent-500/20","data-state-active:text-blue-700","data-state-active:bg-accent-500/20","rounded-full py-2 px-3")}}}),P=n(({"aria-disabled":t,asChild:a=!1,children:e,className:o,disabled:s,...p},f)=>{let{orientation:N,appearance:z}=m(c),l=v(t??s),u={"aria-disabled":t??s,className:r(k({orientation:N,appearance:z}),o),disabled:l,...p};if(a){let g=W.only(e);H(E(g),"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag.");let L=g.props?.children;return i(T,{asChild:!0,...u,ref:f,children:O(l?i("button",{type:"button"}):g,l?{href:void 0,to:void 0}:{tabIndex:0},h(J,{children:[i(d,{}),L]}))})}return h(T,{ref:f,...u,children:[i(d,{}),e]})});P.displayName="TabsTrigger";var C=({className:t,children:a,...e})=>i("span",{className:r("rounded-full bg-gray-500/20 px-1.5 text-xs font-medium text-gray-600","group-data-state-active/tab-trigger:bg-blue-500/20 group-data-state-active/tab-trigger:text-blue-700 group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-blue-700","group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700",t),...e,children:a});C.displayName="TabBadge";var R=n(({className:t,...a},e)=>i(A,{ref:e,className:r("focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4",t),...a}));R.displayName="TabsContent";var I={Root:x,Content:R,List:y,Trigger:P,Badge:C};export{I as Tabs};
|
|
2
2
|
//# sourceMappingURL=tabs.js.map
|
package/dist/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import {\n\tContent as TabsPrimitiveContent,\n\tList as TabsPrimitiveList,\n\tRoot as TabsPrimitiveRoot,\n\tTrigger as TabsPrimitiveTrigger,\n} from \"@radix-ui/react-tabs\";\nimport { cva } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport type {\n\tComponentPropsWithoutRef,\n\tComponentRef,\n\tHTMLAttributes,\n} from \"react\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { parseBooleanish } from \"../../types/booleanish.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\ntype Appearance = \"classic\" | \"pill\";\n\ntype TabsStateContextValue = {\n\torientation: Orientation;\n\tappearance: Appearance;\n};\n\nconst TabsStateContext = createContext<TabsStateContextValue>({\n\torientation: \"horizontal\",\n\tappearance: \"classic\",\n});\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Root = forwardRef<\n\tComponentRef<typeof TabsPrimitiveRoot>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveRoot> & {\n\t\t/**\n\t\t * The appearance of the tabs. Classic appearance shows the tab\n\t\t * list with an underline; pill appearance shows each tab as a pill.\n\t\t * @default \"classic\"\n\t\t */\n\t\tappearance?: \"classic\" | \"pill\";\n\t}\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\torientation = \"horizontal\",\n\t\t\tappearance = \"classic\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<TabsPrimitiveRoot\n\t\t\tclassName={cx(\n\t\t\t\t\"flex gap-4\",\n\t\t\t\torientation === \"horizontal\" ? \"flex-col\" : \"flex-row\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\torientation={orientation}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t>\n\t\t\t<TabsStateContext.Provider value={{ orientation, appearance }}>\n\t\t\t\t{children}\n\t\t\t</TabsStateContext.Provider>\n\t\t</TabsPrimitiveRoot>\n\t),\n);\nRoot.displayName = \"Tabs\";\n\n/**\n * Variants for the List component\n */\nconst listVariants = cva(\"flex border-gray-200\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"flex-row items-center\",\n\t\t\tvertical: \"flex-col items-end gap-3.5 self-stretch\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"\",\n\t\t\tpill: \"\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"pill\",\n\t\t\tclassName: \"gap-1\",\n\t\t},\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"gap-6 border-b\",\n\t\t},\n\t\t{\n\t\t\torientation: \"vertical\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"border-r\",\n\t\t},\n\t],\n});\n\n/**\n * Contains the triggers that are aligned along the edge of the active content.\n * The container for tab triggers that provides the visual layout for tab navigation.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst List = forwardRef<\n\tComponentRef<typeof TabsPrimitiveList>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveList>\n>(({ className, ...props }, ref) => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<TabsPrimitiveList\n\t\t\taria-orientation={orientation}\n\t\t\tclassName={cx(listVariants({ orientation, appearance }), className)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nList.displayName = \"TabsList\";\n\ntype TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitiveTrigger>;\n\n/**\n * Variants for the TabsTriggerDecoration component\n */\nconst triggerDecorationVariants = cva(\"absolute z-0\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"-bottom-px left-0 right-0 h-[0.1875rem]\",\n\t\t\tvertical: \"-right-px bottom-0 top-0 w-[0.1875rem]\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"group-data-state-active/tab-trigger:bg-blue-600\",\n\t\t\tpill: \"hidden\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n});\n\nconst TabsTriggerDecoration = () => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tclassName={clsx(triggerDecorationVariants({ orientation, appearance }))}\n\t\t/>\n\t);\n};\nTabsTriggerDecoration.displayName = \"TabsTriggerDecoration\";\n\n/**\n * Variants for the Trigger component\n */\nconst triggerVariants = cva(\n\tcx(\n\t\t\"group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600\",\n\t\t\"ring-focus-accent outline-hidden\",\n\t\t\"aria-disabled:cursor-default aria-disabled:opacity-50\",\n\t\t\"focus-visible:ring-4\",\n\t\t\"[&>svg]:shrink-0 [&>svg]:size-5\",\n\t\t\"not-aria-disabled:hover:text-gray-900\",\n\t),\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal: \"rounded-tl-md rounded-tr-md\",\n\t\t\t\tvertical: \"rounded-bl-md rounded-tl-md pr-3\",\n\t\t\t} as const satisfies Record<Orientation, string>,\n\t\t\tappearance: {\n\t\t\t\tclassic: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-600\",\n\t\t\t\t\t\"data-state-active:text-blue-600\",\n\t\t\t\t),\n\t\t\t\tpill: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-700\",\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"data-state-active:text-blue-700\",\n\t\t\t\t\t\"data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"rounded-full py-2 px-3\",\n\t\t\t\t),\n\t\t\t} as const satisfies Record<Appearance, string>,\n\t\t},\n\t},\n);\n\n/**\n * The button that activates its associated content.\n * A clickable tab trigger that switches between different tab content panels.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Trigger = forwardRef<\n\tComponentRef<typeof TabsPrimitiveTrigger>,\n\tTabsTriggerProps\n>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { orientation, appearance } = useContext(TabsStateContext);\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled);\n\n\t\tconst tabsTriggerProps = {\n\t\t\t\"aria-disabled\": _ariaDisabled ?? _disabled,\n\t\t\tclassName: cx(triggerVariants({ orientation, appearance }), className),\n\t\t\tdisabled,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tinvariant(\n\t\t\t\tisValidElement<TabsTriggerProps>(singleChild),\n\t\t\t\t\"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag.\",\n\t\t\t);\n\t\t\tconst grandchildren = singleChild.props?.children;\n\n\t\t\tconst cloneProps = {\n\t\t\t\t...(disabled\n\t\t\t\t\t? /**\n\t\t\t\t\t\t * When disabled, prevent anchor/link children from being clickable by\n\t\t\t\t\t\t * removing their href/to props!\n\t\t\t\t\t\t * This is necessary because `<a>` doesn't support the `disabled`\n\t\t\t\t\t\t * attribute and would be navigable. We could use `pointer-events-none`\n\t\t\t\t\t\t * instead, but don't by default because it would also prevent tooltip\n\t\t\t\t\t\t * interactions, which may be surprising.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t{ href: undefined, to: undefined }\n\t\t\t\t\t: /**\n\t\t\t\t\t\t * when NOT disabled, allow keyboard navigation to the trigger,\n\t\t\t\t\t\t * even for asChild anchors/links\n\t\t\t\t\t\t */\n\t\t\t\t\t\t{ tabIndex: 0 }),\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<TabsPrimitiveTrigger asChild {...tabsTriggerProps} ref={ref}>\n\t\t\t\t\t{cloneElement(\n\t\t\t\t\t\tdisabled ? <button type=\"button\" /> : singleChild,\n\t\t\t\t\t\tcloneProps,\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t\t</>,\n\t\t\t\t\t)}\n\t\t\t\t</TabsPrimitiveTrigger>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TabsPrimitiveTrigger ref={ref} {...tabsTriggerProps}>\n\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t{children}\n\t\t\t</TabsPrimitiveTrigger>\n\t\t);\n\t},\n);\nTrigger.displayName = \"TabsTrigger\";\n\n/**\n * A badge component that can be used inside tab triggers to display additional information.\n * Typically used to show counts or status indicators within tab headers.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">\n * Account <Tabs.Badge>5</Tabs.Badge>\n * </Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * </Tabs.Root>\n * ```\n */\nconst Badge = ({\n\tclassName,\n\tchildren,\n\t...props\n}: HTMLAttributes<HTMLSpanElement>) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"rounded-full bg-gray-500/20 px-1.5 text-xs font-medium text-gray-600\",\n\t\t\t\"group-data-state-active/tab-trigger:bg-blue-500/20 group-data-state-active/tab-trigger:text-blue-700 group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-blue-700\",\n\t\t\t\"group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</span>\n);\nBadge.displayName = \"TabBadge\";\n\n/**\n * Contains the content associated with each trigger.\n * The content panel that displays when its corresponding tab trigger is active.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TabsPrimitiveContent>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveContent>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitiveContent\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContent.displayName = \"TabsContent\";\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Tabs = {\n\t/**\n\t * The root container of the tabs component that provides context for all tab components.\n\t * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * Contains the content associated with each trigger.\n\t * The content panel that displays when its corresponding tab trigger is active.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * Contains the triggers that are aligned along the edge of the active content.\n\t * The container for tab triggers that provides the visual layout for tab navigation.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * The button that activates its associated content.\n\t * A clickable tab trigger that switches between different tab content panels.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tTrigger,\n\t/**\n\t * A badge component that can be used inside tab triggers to display additional information.\n\t * Typically used to show counts or status indicators within tab headers.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">\n\t * Account <Tabs.Badge>5</Tabs.Badge>\n\t * </Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tBadge,\n} as const;\n\nexport {\n\t//\n\tTabs,\n};\n"],"mappings":"gFAAA,OACC,WAAWA,EACX,QAAQC,EACR,QAAQC,EACR,WAAWC,MACL,uBACP,OAAS,OAAAC,MAAW,2BACpB,OAAOC,MAAU,OAMjB,OACC,YAAAC,EACA,gBAAAC,EACA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D,SAAA0B,EACAV,EAAW3B,EAAC,UAAO,KAAK,SAAS,EAAK8B,EACtCK,EACAlC,EAAAF,EAAA,CACC,UAAAC,EAACoB,EAAA,EAAsB,EACtBc,GACF,CACD,EACD,CAEF,CAEA,OACCjC,EAACmC,EAAA,CAAqB,IAAKzB,EAAM,GAAGkB,EACnC,UAAA7B,EAACoB,EAAA,EAAsB,EACtBb,GACF,CAEF,CACD,EACAgB,EAAQ,YAAc,cAoBtB,IAAMe,EAAQ,CAAC,CACd,UAAAhC,EACA,SAAAC,EACA,GAAGG,CACJ,IACCV,EAAC,QACA,UAAWa,EACV,uEACA,2MACA,kEACAP,CACD,EACC,GAAGI,EAEH,SAAAH,EACF,EAED+B,EAAM,YAAc,WAwBpB,IAAMC,EAAUlC,EAGd,CAAC,CAAE,UAAAC,EAAW,GAAGI,CAAM,EAAGC,IAC3BX,EAACwC,EAAA,CACA,IAAK7B,EACL,UAAWE,EACV,sEACAP,CACD,EACC,GAAGI,EACL,CACA,EACD6B,EAAQ,YAAc,cAwBtB,IAAME,EAAO,CAoBZ,KAAArC,EAmBA,QAAAmC,EAiBA,KAAAvB,EAiBA,QAAAO,EAkBA,MAAAe,CACD","names":["TabsPrimitiveContent","TabsPrimitiveList","TabsPrimitiveRoot","TabsPrimitiveTrigger","cva","clsx","Children","cloneElement","createContext","forwardRef","isValidElement","useContext","invariant","Fragment","jsx","jsxs","TabsStateContext","createContext","Root","forwardRef","className","children","orientation","appearance","props","ref","TabsPrimitiveRoot","cx","listVariants","cva","List","useContext","TabsPrimitiveList","triggerDecorationVariants","TabsTriggerDecoration","clsx","triggerVariants","Trigger","_ariaDisabled","asChild","_disabled","disabled","parseBooleanish","tabsTriggerProps","singleChild","Children","invariant","isValidElement","grandchildren","cloneProps","TabsPrimitiveTrigger","cloneElement","Badge","Content","TabsPrimitiveContent","Tabs"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import {\n\tContent as TabsPrimitiveContent,\n\tList as TabsPrimitiveList,\n\tRoot as TabsPrimitiveRoot,\n\tTrigger as TabsPrimitiveTrigger,\n} from \"@radix-ui/react-tabs\";\nimport { cva } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport type { ComponentPropsWithoutRef, ComponentRef, HTMLAttributes } from \"react\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { parseBooleanish } from \"../../types/booleanish.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\ntype Appearance = \"classic\" | \"pill\";\n\ntype TabsStateContextValue = {\n\torientation: Orientation;\n\tappearance: Appearance;\n};\n\nconst TabsStateContext = createContext<TabsStateContextValue>({\n\torientation: \"horizontal\",\n\tappearance: \"classic\",\n});\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Root = forwardRef<\n\tComponentRef<typeof TabsPrimitiveRoot>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveRoot> & {\n\t\t/**\n\t\t * The appearance of the tabs. Classic appearance shows the tab\n\t\t * list with an underline; pill appearance shows each tab as a pill.\n\t\t * @default \"classic\"\n\t\t */\n\t\tappearance?: \"classic\" | \"pill\";\n\t}\n>(({ className, children, orientation = \"horizontal\", appearance = \"classic\", ...props }, ref) => (\n\t<TabsPrimitiveRoot\n\t\tclassName={cx(\"flex gap-4\", orientation === \"horizontal\" ? \"flex-col\" : \"flex-row\", className)}\n\t\torientation={orientation}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t<TabsStateContext.Provider value={{ orientation, appearance }}>\n\t\t\t{children}\n\t\t</TabsStateContext.Provider>\n\t</TabsPrimitiveRoot>\n));\nRoot.displayName = \"Tabs\";\n\n/**\n * Variants for the List component\n */\nconst listVariants = cva(\"flex border-gray-200\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"flex-row items-center\",\n\t\t\tvertical: \"flex-col items-end gap-3.5 self-stretch\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"\",\n\t\t\tpill: \"\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"pill\",\n\t\t\tclassName: \"gap-1\",\n\t\t},\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"gap-6 border-b\",\n\t\t},\n\t\t{\n\t\t\torientation: \"vertical\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"border-r\",\n\t\t},\n\t],\n});\n\n/**\n * Contains the triggers that are aligned along the edge of the active content.\n * The container for tab triggers that provides the visual layout for tab navigation.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst List = forwardRef<\n\tComponentRef<typeof TabsPrimitiveList>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveList>\n>(({ className, ...props }, ref) => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<TabsPrimitiveList\n\t\t\taria-orientation={orientation}\n\t\t\tclassName={cx(listVariants({ orientation, appearance }), className)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nList.displayName = \"TabsList\";\n\ntype TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitiveTrigger>;\n\n/**\n * Variants for the TabsTriggerDecoration component\n */\nconst triggerDecorationVariants = cva(\"absolute z-0\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"-bottom-px left-0 right-0 h-0.75\",\n\t\t\tvertical: \"-right-px bottom-0 top-0 w-0.75\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"group-data-state-active/tab-trigger:bg-blue-600\",\n\t\t\tpill: \"hidden\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n});\n\nconst TabsTriggerDecoration = () => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<span aria-hidden className={clsx(triggerDecorationVariants({ orientation, appearance }))} />\n\t);\n};\nTabsTriggerDecoration.displayName = \"TabsTriggerDecoration\";\n\n/**\n * Variants for the Trigger component\n */\nconst triggerVariants = cva(\n\tcx(\n\t\t\"group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600\",\n\t\t\"ring-focus-accent outline-hidden\",\n\t\t\"aria-disabled:cursor-default aria-disabled:opacity-50\",\n\t\t\"focus-visible:ring-4\",\n\t\t\"[&>svg]:shrink-0 [&>svg]:size-5\",\n\t\t\"not-aria-disabled:hover:text-gray-900\",\n\t),\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal: \"rounded-tl-md rounded-tr-md\",\n\t\t\t\tvertical: \"rounded-bl-md rounded-tl-md pr-3\",\n\t\t\t} as const satisfies Record<Orientation, string>,\n\t\t\tappearance: {\n\t\t\t\tclassic: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-600\",\n\t\t\t\t\t\"data-state-active:text-blue-600\",\n\t\t\t\t),\n\t\t\t\tpill: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-700\",\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"data-state-active:text-blue-700\",\n\t\t\t\t\t\"data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"rounded-full py-2 px-3\",\n\t\t\t\t),\n\t\t\t} as const satisfies Record<Appearance, string>,\n\t\t},\n\t},\n);\n\n/**\n * The button that activates its associated content.\n * A clickable tab trigger that switches between different tab content panels.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Trigger = forwardRef<ComponentRef<typeof TabsPrimitiveTrigger>, TabsTriggerProps>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { orientation, appearance } = useContext(TabsStateContext);\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled);\n\n\t\tconst tabsTriggerProps = {\n\t\t\t\"aria-disabled\": _ariaDisabled ?? _disabled,\n\t\t\tclassName: cx(triggerVariants({ orientation, appearance }), className),\n\t\t\tdisabled,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tinvariant(\n\t\t\t\tisValidElement<TabsTriggerProps>(singleChild),\n\t\t\t\t\"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag.\",\n\t\t\t);\n\t\t\tconst grandchildren = singleChild.props?.children;\n\n\t\t\tconst cloneProps = disabled\n\t\t\t\t? /**\n\t\t\t\t\t * When disabled, prevent anchor/link children from being clickable by\n\t\t\t\t\t * removing their href/to props!\n\t\t\t\t\t * This is necessary because `<a>` doesn't support the `disabled`\n\t\t\t\t\t * attribute and would be navigable. We could use `pointer-events-none`\n\t\t\t\t\t * instead, but don't by default because it would also prevent tooltip\n\t\t\t\t\t * interactions, which may be surprising.\n\t\t\t\t\t */\n\t\t\t\t\t{ href: undefined, to: undefined }\n\t\t\t\t: /**\n\t\t\t\t\t * when NOT disabled, allow keyboard navigation to the trigger,\n\t\t\t\t\t * even for asChild anchors/links\n\t\t\t\t\t */\n\t\t\t\t\t{ tabIndex: 0 };\n\n\t\t\treturn (\n\t\t\t\t<TabsPrimitiveTrigger asChild {...tabsTriggerProps} ref={ref}>\n\t\t\t\t\t{cloneElement(\n\t\t\t\t\t\tdisabled ? <button type=\"button\" /> : singleChild,\n\t\t\t\t\t\tcloneProps,\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t\t</>,\n\t\t\t\t\t)}\n\t\t\t\t</TabsPrimitiveTrigger>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TabsPrimitiveTrigger ref={ref} {...tabsTriggerProps}>\n\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t{children}\n\t\t\t</TabsPrimitiveTrigger>\n\t\t);\n\t},\n);\nTrigger.displayName = \"TabsTrigger\";\n\n/**\n * A badge component that can be used inside tab triggers to display additional information.\n * Typically used to show counts or status indicators within tab headers.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">\n * Account <Tabs.Badge>5</Tabs.Badge>\n * </Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * </Tabs.Root>\n * ```\n */\nconst Badge = ({ className, children, ...props }: HTMLAttributes<HTMLSpanElement>) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"rounded-full bg-gray-500/20 px-1.5 text-xs font-medium text-gray-600\",\n\t\t\t\"group-data-state-active/tab-trigger:bg-blue-500/20 group-data-state-active/tab-trigger:text-blue-700 group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-blue-700\",\n\t\t\t\"group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</span>\n);\nBadge.displayName = \"TabBadge\";\n\n/**\n * Contains the content associated with each trigger.\n * The content panel that displays when its corresponding tab trigger is active.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TabsPrimitiveContent>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveContent>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitiveContent\n\t\tref={ref}\n\t\tclassName={cx(\"focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4\", className)}\n\t\t{...props}\n\t/>\n));\nContent.displayName = \"TabsContent\";\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Tabs = {\n\t/**\n\t * The root container of the tabs component that provides context for all tab components.\n\t * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * Contains the content associated with each trigger.\n\t * The content panel that displays when its corresponding tab trigger is active.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * Contains the triggers that are aligned along the edge of the active content.\n\t * The container for tab triggers that provides the visual layout for tab navigation.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * The button that activates its associated content.\n\t * A clickable tab trigger that switches between different tab content panels.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tTrigger,\n\t/**\n\t * A badge component that can be used inside tab triggers to display additional information.\n\t * Typically used to show counts or status indicators within tab headers.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">\n\t * Account <Tabs.Badge>5</Tabs.Badge>\n\t * </Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tBadge,\n} as const;\n\nexport {\n\t//\n\tTabs,\n};\n"],"mappings":"gFAAA,OACC,WAAWA,EACX,QAAQC,EACR,QAAQC,EACR,WAAWC,MACL,uBACP,OAAS,OAAAC,MAAW,2BACpB,OAAOC,MAAU,OAEjB,OACC,YAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,cAAAC,MACM,QACP,OAAOC,MAAe,iBAwDpB,OAgNI,YAAAC,EAhNJ,OAAAC,EAgNI,QAAAC,MAhNJ,oBA5CF,IAAMC,EAAmBC,EAAqC,CAC7D,YAAa,aACb,WAAY,SACb,CAAC,EAwBKC,EAAOC,EAUX,CAAC,CAAE,UAAAC,EAAW,SAA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EACAgB,EAAQ,YAAc,cAoBtB,IAAMc,EAAQ,CAAC,CAAE,UAAA/B,EAAW,SAAAC,EAAU,GAAGG,CAAM,IAC9CV,EAAC,QACA,UAAWa,EACV,uEACA,2MACA,kEACAP,CACD,EACC,GAAGI,EAEH,SAAAH,EACF,EAED8B,EAAM,YAAc,WAwBpB,IAAMC,EAAUjC,EAGd,CAAC,CAAE,UAAAC,EAAW,GAAGI,CAAM,EAAGC,IAC3BX,EAACuC,EAAA,CACA,IAAK5B,EACL,UAAWE,EAAG,sEAAuEP,CAAS,EAC7F,GAAGI,EACL,CACA,EACD4B,EAAQ,YAAc,cAwBtB,IAAME,EAAO,CAoBZ,KAAApC,EAmBA,QAAAkC,EAiBA,KAAAtB,EAiBA,QAAAO,EAkBA,MAAAc,CACD","names":["TabsPrimitiveContent","TabsPrimitiveList","TabsPrimitiveRoot","TabsPrimitiveTrigger","cva","clsx","Children","cloneElement","createContext","forwardRef","isValidElement","useContext","invariant","Fragment","jsx","jsxs","TabsStateContext","createContext","Root","forwardRef","className","children","orientation","appearance","props","ref","TabsPrimitiveRoot","cx","listVariants","cva","List","useContext","TabsPrimitiveList","triggerDecorationVariants","TabsTriggerDecoration","clsx","triggerVariants","Trigger","_ariaDisabled","asChild","_disabled","disabled","parseBooleanish","tabsTriggerProps","singleChild","Children","invariant","isValidElement","grandchildren","TabsPrimitiveTrigger","cloneElement","Badge","Content","TabsPrimitiveContent","Tabs"]}
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { T as Theme, R as ResolvedTheme } from './themes-
|
|
4
|
-
export {
|
|
3
|
+
import { T as Theme, R as ResolvedTheme } from './themes-Bi46K9ZW.js';
|
|
4
|
+
export { $ as $resolvedTheme, a as $theme, i as isResolvedTheme, b as isTheme, r as resolvedThemes, t as themes } from './themes-Bi46K9ZW.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* ThemeProviderState is the shape of the state returned by the ThemeProviderContext.
|
package/dist/theme.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,b as m,c as t,d as o,e as r,f as s,g as h,h as T,i as n,j as l,k as d,l as p,m as i,n as a,o as f,p as v,q as x}from"./chunk-
|
|
1
|
+
import{a as e,b as m,c as t,d as o,e as r,f as s,g as h,h as T,i as n,j as l,k as d,l as p,m as i,n as a,o as f,p as v,q as x}from"./chunk-B2CXQETQ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-PFXFESEN.js";export{T as $resolvedTheme,s as $theme,f as MantleThemeHeadContent,t as PreloadCoreFonts,l as ThemeProvider,e as assetsCdnOrigin,m as fontHref,x as getStoredTheme,n as isResolvedTheme,h as isTheme,a as preventWrongThemeFlashScriptContent,p as readThemeFromHtmlElement,o as resolvedThemes,r as themes,i as useAppliedTheme,v as useInitialHtmlThemeProps,d as useTheme};
|
|
2
2
|
//# sourceMappingURL=theme.js.map
|
|
@@ -31,4 +31,4 @@ declare const $resolvedTheme: <T extends ResolvedTheme = ResolvedTheme>(value: T
|
|
|
31
31
|
*/
|
|
32
32
|
declare function isResolvedTheme(value: unknown): value is ResolvedTheme;
|
|
33
33
|
|
|
34
|
-
export { $
|
|
34
|
+
export { $resolvedTheme as $, type ResolvedTheme as R, type Theme as T, $theme as a, isTheme as b, isResolvedTheme as i, resolvedThemes as r, themes as t };
|
package/dist/toast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as ToastPrimitive from 'sonner';
|
|
5
5
|
import { W as WithAsChild } from './as-child-DJ7x3JFV.js';
|
package/dist/toast.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as t,c as r}from"./chunk-
|
|
1
|
+
import{a as o,b as t,c as r}from"./chunk-HG2MWNPU.js";import"./chunk-B2CXQETQ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-SBVSECWW.js";import"./chunk-ODDNPNLN.js";import"./chunk-NZ6DRFAL.js";import"./chunk-PFXFESEN.js";export{r as Toast,o as Toaster,t as makeToast};
|
|
2
2
|
//# sourceMappingURL=toast.js.map
|
package/dist/tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { forwardRef } from \"react\";\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { forwardRef } from \"react\";\nimport type { ComponentProps, ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\n/**\n * Wraps your app to provide global functionality to your tooltips.\n * Only one instance of this component should be rendered in your app, preferably at the root.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-provider\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <App />\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = ({\n\tdelayDuration = 0,\n\t...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n\t<TooltipPrimitive.Provider\n\t\tdata-slot=\"tooltip-provider\"\n\t\tdelayDuration={delayDuration ?? 0}\n\t\t{...props}\n\t/>\n);\nTooltipProvider.displayName = \"Tooltip.Provider\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Root(props: ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\nRoot.displayName = \"Tooltip.Root\";\n\n/**\n * The trigger button that opens the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\nTrigger.displayName = \"Tooltip.Trigger\";\n\n/**\n * The content to render inside the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TooltipPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Portal>\n\t\t<TooltipPrimitive.Content\n\t\t\tclassName={cx(\n\t\t\t\t\"bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"tooltip-content\"\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<TooltipPrimitive.Arrow asChild>\n\t\t\t\t<div className=\"bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs\" />\n\t\t\t</TooltipPrimitive.Arrow>\n\t\t</TooltipPrimitive.Content>\n\t</TooltipPrimitive.Portal>\n));\nContent.displayName = \"Tooltip.Content\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Tooltip = {\n\t/**\n\t * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n\t * This is the root, stateful component that manages the open/closed state of the tooltip.\n\t * Will throw if you have not wrapped your app in a `TooltipProvider`.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * The content to render inside the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * The trigger button that opens the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tTooltip,\n\tTooltipProvider,\n};\n"],"mappings":"wCAAA,UAAYA,MAAsB,0BAClC,OAAS,cAAAC,MAAkB,QAqB1B,cAAAC,EAkFC,QAAAC,MAlFD,oBAJD,IAAMC,EAAkB,CAAC,CACxB,cAAAC,EAAgB,EAChB,GAAGC,CACJ,IACCJ,EAAkB,WAAjB,CACA,YAAU,mBACV,cAAeG,GAAiB,EAC/B,GAAGC,EACL,EAEDF,EAAgB,YAAc,mBAuB9B,SAASG,EAAKD,EAAqD,CAClE,OAAOJ,EAAkB,OAAjB,CAAsB,YAAU,UAAW,GAAGI,EAAO,CAC9D,CACAC,EAAK,YAAc,eAqBnB,SAASC,EAAQF,EAAwD,CACxE,OAAOJ,EAAkB,UAAjB,CAAyB,YAAU,kBAAmB,GAAGI,EAAO,CACzE,CACAE,EAAQ,YAAc,kBAqBtB,IAAMC,EAAUC,EAGd,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGP,CAAM,EAAGQ,IACrDZ,EAAkB,SAAjB,CACA,SAAAC,EAAkB,UAAjB,CACA,UAAWY,EACV,sYACAH,CACD,EACA,YAAU,kBACV,IAAKE,EACL,WAAYD,EACX,GAAGP,EAEH,UAAAK,EACDT,EAAkB,QAAjB,CAAuB,QAAO,GAC9B,SAAAA,EAAC,OAAI,UAAU,6EAA6E,EAC7F,GACD,EACD,CACA,EACDO,EAAQ,YAAc,kBAuBtB,IAAMO,EAAU,CAsBf,KAAAT,EAoBA,QAAAE,EAoBA,QAAAD,CACD","names":["TooltipPrimitive","forwardRef","jsx","jsxs","TooltipProvider","delayDuration","props","Root","Trigger","Content","forwardRef","children","className","sideOffset","ref","cx","Tooltip"]}
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-4LSFAAZW.js";import{a}from"./chunk-
|
|
1
|
+
import"./chunk-4LSFAAZW.js";import{a}from"./chunk-OP6JMBKJ.js";export{a as parseBooleanish};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|