@ngrok/mantle 0.65.0 → 0.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +158 -154
- package/dist/accordion.js +1 -1
- package/dist/accordion.js.map +1 -1
- package/dist/alert-dialog.d.ts +282 -277
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert.d.ts +145 -138
- package/dist/alert.js +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/anchor.d.ts +25 -22
- package/dist/anchor.js +1 -1
- package/dist/anchor.js.map +1 -1
- package/dist/as-child-XMVTepJu.d.ts +31 -0
- package/dist/badge.d.ts +29 -19
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/booleanish-CBGdPL3Q.js +2 -0
- package/dist/booleanish-CBGdPL3Q.js.map +1 -0
- package/dist/browser-only-jrBUqioz.js +2 -0
- package/dist/browser-only-jrBUqioz.js.map +1 -0
- package/dist/browser-only.d.ts +20 -15
- package/dist/browser-only.js +1 -2
- package/dist/button-CKL-3sIr.d.ts +175 -0
- package/dist/button-CRRPesae.js +2 -0
- package/dist/button-CRRPesae.js.map +1 -0
- package/dist/button-DA2p0_5F.js +2 -0
- package/dist/button-DA2p0_5F.js.map +1 -0
- package/dist/button.d.ts +4 -9
- package/dist/button.js +1 -2
- package/dist/calendar.d.ts +14 -8
- package/dist/calendar.js +1 -1
- package/dist/calendar.js.map +1 -1
- package/dist/card.d.ts +99 -97
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/checkbox.d.ts +14 -12
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/code-block.d.ts +254 -237
- package/dist/code-block.js +3 -3
- package/dist/code-block.js.map +1 -1
- package/dist/code.d.ts +5 -3
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/color.d.ts +2 -38
- package/dist/color.js +1 -1
- package/dist/color.js.map +1 -1
- package/dist/combobox.d.ts +172 -167
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/command.d.ts +234 -227
- package/dist/command.js +1 -1
- package/dist/command.js.map +1 -1
- package/dist/compose-refs-DeIsFv68.js +2 -0
- package/dist/compose-refs-DeIsFv68.js.map +1 -0
- package/dist/cx-bKromGBh.js +2 -0
- package/dist/cx-bKromGBh.js.map +1 -0
- package/dist/cx.d.ts +4 -2
- package/dist/cx.js +1 -2
- package/dist/data-table.d.ts +211 -184
- package/dist/data-table.js +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/deep-non-nullable-BLM3Gz0I.d.ts +8 -0
- package/dist/description-list.d.ts +61 -59
- package/dist/description-list.js +1 -1
- package/dist/description-list.js.map +1 -1
- package/dist/dialog-BuD_JQf_.d.ts +422 -0
- package/dist/dialog-CGBjHvo_.js +2 -0
- package/dist/dialog-CGBjHvo_.js.map +1 -0
- package/dist/dialog.d.ts +3 -410
- package/dist/dialog.js +1 -2
- package/dist/direction-DfrtFTny.js +2 -0
- package/dist/direction-DfrtFTny.js.map +1 -0
- package/dist/{direction-DHheuUag.d.ts → direction-deXpJFDZ.d.ts} +9 -7
- package/dist/dropdown-menu-CjOaj-Ap.js +2 -0
- package/dist/dropdown-menu-CjOaj-Ap.js.map +1 -0
- package/dist/dropdown-menu-D_ZoY1AH.d.ts +330 -0
- package/dist/dropdown-menu.d.ts +2 -325
- package/dist/dropdown-menu.js +1 -2
- package/dist/flag.d.ts +31 -22
- package/dist/flag.js +1 -1
- package/dist/flag.js.map +1 -1
- package/dist/hooks.d.ts +116 -50
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/hover-card.d.ts +97 -91
- package/dist/hover-card.js +1 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/{icon-DXTMiV1L.d.ts → icon-B1XLv02t.d.ts} +11 -9
- package/dist/icon-B5oNYYrJ.js +2 -0
- package/dist/icon-B5oNYYrJ.js.map +1 -0
- package/dist/icon-button-2r6S3HVA.d.ts +98 -0
- package/dist/icon-button-D4e9-dq-.js +2 -0
- package/dist/icon-button-D4e9-dq-.js.map +1 -0
- package/dist/icon.d.ts +4 -4
- package/dist/icon.js +1 -2
- package/dist/icons.d.ts +54 -41
- package/dist/icons.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/{in-view-aHeQHaUj.d.ts → in-view-CTQRT44m.d.ts} +29 -22
- package/dist/in-view-bPnaWEL4.js +2 -0
- package/dist/in-view-bPnaWEL4.js.map +1 -0
- package/dist/index-BLCvtjLi.d.ts +40 -0
- package/dist/index-DWqhfw9n.d.ts +103 -0
- package/dist/{button-group-BFnqgdtl.d.ts → index-ViSCOUrU.d.ts} +10 -8
- package/dist/index-s8rMcilU.d.ts +47 -0
- package/dist/input.d.ts +3 -100
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/is-input-BFR8yMM7.js +2 -0
- package/dist/is-input-BFR8yMM7.js.map +1 -0
- package/dist/kbd-pyj32aN4.js +2 -0
- package/dist/kbd-pyj32aN4.js.map +1 -0
- package/dist/kbd.d.ts +10 -4
- package/dist/kbd.js +1 -2
- package/dist/label.d.ts +8 -6
- package/dist/label.js +1 -1
- package/dist/label.js.map +1 -1
- package/dist/media-object.d.ts +70 -68
- package/dist/media-object.js +1 -1
- package/dist/media-object.js.map +1 -1
- package/dist/multi-select.d.ts +278 -0
- package/dist/multi-select.js +2 -0
- package/dist/multi-select.js.map +1 -0
- package/dist/pagination.d.ts +168 -164
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/popover.d.ts +119 -117
- package/dist/popover.js +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/primitive-W5Izf14l.js +2 -0
- package/dist/primitive-W5Izf14l.js.map +1 -0
- package/dist/primitive-tuHqhoRE.d.ts +16 -0
- package/dist/progress.d.ts +175 -150
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.d.ts +246 -230
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/sandboxed-on-click.d.ts +36 -31
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/sandboxed-on-click.js.map +1 -1
- package/dist/select-39Jfc1Cb.d.ts +265 -0
- package/dist/select-DZ2ztBkI.js +2 -0
- package/dist/select-DZ2ztBkI.js.map +1 -0
- package/dist/select.d.ts +2 -263
- package/dist/select.js +1 -2
- package/dist/separator-BcCNbHBg.js +2 -0
- package/dist/separator-BcCNbHBg.js.map +1 -0
- package/dist/separator.d.ts +28 -21
- package/dist/separator.js +1 -2
- package/dist/sheet.d.ts +319 -305
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/skeleton.d.ts +8 -6
- package/dist/skeleton.js +1 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.d.ts +48 -35
- package/dist/slider.js +1 -1
- package/dist/slider.js.map +1 -1
- package/dist/slot-DdnjeV2n.js +2 -0
- package/dist/slot-DdnjeV2n.js.map +1 -0
- package/dist/slot.d.ts +6 -4
- package/dist/slot.js +1 -2
- package/dist/sort-CfPsu1Gs.js +2 -0
- package/dist/sort-CfPsu1Gs.js.map +1 -0
- package/dist/split-button.d.ts +158 -162
- package/dist/split-button.js +1 -1
- package/dist/split-button.js.map +1 -1
- package/dist/svg-only-BVLlbQ4e.js +2 -0
- package/dist/svg-only-BVLlbQ4e.js.map +1 -0
- package/dist/{svg-only-Cp8Mu_sh.d.ts → svg-only-Dti1FvNV.d.ts} +11 -9
- package/dist/switch.d.ts +10 -8
- package/dist/switch.js +1 -1
- package/dist/switch.js.map +1 -1
- package/dist/table-BWMp12sl.js +2 -0
- package/dist/table-BWMp12sl.js.map +1 -0
- package/dist/table-Dpt192qt.d.ts +398 -0
- package/dist/table.d.ts +2 -396
- package/dist/table.js +1 -2
- package/dist/tabs.d.ts +110 -104
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/text-area.d.ts +10 -8
- package/dist/text-area.js +1 -1
- package/dist/text-area.js.map +1 -1
- package/dist/theme-provider-CbzLgte1.js +2 -0
- package/dist/theme-provider-CbzLgte1.js.map +1 -0
- package/dist/theme.d.ts +65 -38
- package/dist/theme.js +1 -2
- package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
- package/dist/toast-B4gxB8U0.js +2 -0
- package/dist/toast-B4gxB8U0.js.map +1 -0
- package/dist/toast.d.ts +95 -87
- package/dist/toast.js +1 -2
- package/dist/tooltip.d.ts +78 -73
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/{chunk-W2YQRWR5.js → traffic-policy-file-QnF-2YkY.js} +2 -2
- package/dist/traffic-policy-file-QnF-2YkY.js.map +1 -0
- package/dist/types-884RJJqm.js +2 -0
- package/dist/types-884RJJqm.js.map +1 -0
- package/dist/{types-DehRoXC5.d.ts → types-DgXUgkpc.d.ts} +38 -36
- package/dist/types-Dh4BVhXC.d.ts +9 -0
- package/dist/types.d.ts +6 -49
- package/dist/types.js +1 -2
- package/dist/use-copy-to-clipboard-BEbQOKHc.js +2 -0
- package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +1 -0
- package/dist/use-matches-media-query-BxTQ5f4i.js +2 -0
- package/dist/use-matches-media-query-BxTQ5f4i.js.map +1 -0
- package/dist/use-prefers-reduced-motion-BPlsKyCJ.js +2 -0
- package/dist/use-prefers-reduced-motion-BPlsKyCJ.js.map +1 -0
- package/dist/utils.d.ts +6 -5
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/variant-props-UE-phTwh.d.ts +13 -0
- package/dist/with-style-props-D1QFTzj6.d.ts +29 -0
- package/package.json +15 -7
- package/dist/as-child-DJ7x3JFV.d.ts +0 -21
- package/dist/browser-only.js.map +0 -1
- package/dist/button-DLUUf_c-.d.ts +0 -173
- package/dist/button.js.map +0 -1
- package/dist/chunk-63ZAW25Z.js +0 -2
- package/dist/chunk-63ZAW25Z.js.map +0 -1
- package/dist/chunk-6J7D73WA.js +0 -2
- package/dist/chunk-6J7D73WA.js.map +0 -1
- package/dist/chunk-72TJUKMV.js +0 -1
- package/dist/chunk-72TJUKMV.js.map +0 -1
- package/dist/chunk-7MJQGBE4.js +0 -2
- package/dist/chunk-7MJQGBE4.js.map +0 -1
- package/dist/chunk-7YLII2US.js +0 -2
- package/dist/chunk-7YLII2US.js.map +0 -1
- package/dist/chunk-ADF5DAYG.js +0 -2
- package/dist/chunk-ADF5DAYG.js.map +0 -1
- package/dist/chunk-CBRSMQ26.js +0 -2
- package/dist/chunk-CBRSMQ26.js.map +0 -1
- package/dist/chunk-COQIVAQH.js +0 -2
- package/dist/chunk-COQIVAQH.js.map +0 -1
- package/dist/chunk-EIEPGCIG.js +0 -2
- package/dist/chunk-EIEPGCIG.js.map +0 -1
- package/dist/chunk-ELZLLG6G.js +0 -2
- package/dist/chunk-ELZLLG6G.js.map +0 -1
- package/dist/chunk-EYZYDUS2.js +0 -2
- package/dist/chunk-EYZYDUS2.js.map +0 -1
- package/dist/chunk-HF3KJHO3.js +0 -2
- package/dist/chunk-HF3KJHO3.js.map +0 -1
- package/dist/chunk-HKSO72E5.js +0 -2
- package/dist/chunk-HKSO72E5.js.map +0 -1
- package/dist/chunk-HL2HWYKP.js +0 -2
- package/dist/chunk-HL2HWYKP.js.map +0 -1
- package/dist/chunk-IVQ626TU.js +0 -2
- package/dist/chunk-IVQ626TU.js.map +0 -1
- package/dist/chunk-JQ5D5YZR.js +0 -2
- package/dist/chunk-JQ5D5YZR.js.map +0 -1
- package/dist/chunk-KCF3KPUB.js +0 -2
- package/dist/chunk-KCF3KPUB.js.map +0 -1
- package/dist/chunk-KMNACVH6.js +0 -2
- package/dist/chunk-KMNACVH6.js.map +0 -1
- package/dist/chunk-MLXONRJD.js +0 -2
- package/dist/chunk-MLXONRJD.js.map +0 -1
- package/dist/chunk-NJNFZ2EG.js +0 -2
- package/dist/chunk-NJNFZ2EG.js.map +0 -1
- package/dist/chunk-OHPGAB7U.js +0 -2
- package/dist/chunk-OHPGAB7U.js.map +0 -1
- package/dist/chunk-OP6JMBKJ.js +0 -2
- package/dist/chunk-OP6JMBKJ.js.map +0 -1
- package/dist/chunk-PFXFESEN.js +0 -2
- package/dist/chunk-PFXFESEN.js.map +0 -1
- package/dist/chunk-PNL7JOXI.js +0 -2
- package/dist/chunk-PNL7JOXI.js.map +0 -1
- package/dist/chunk-RED6SFAV.js +0 -2
- package/dist/chunk-RED6SFAV.js.map +0 -1
- package/dist/chunk-SBQHQ2SJ.js +0 -2
- package/dist/chunk-SBQHQ2SJ.js.map +0 -1
- package/dist/chunk-W2YQRWR5.js.map +0 -1
- package/dist/chunk-W5A5HSFE.js +0 -2
- package/dist/chunk-W5A5HSFE.js.map +0 -1
- package/dist/chunk-YPAUKPCE.js +0 -2
- package/dist/chunk-YPAUKPCE.js.map +0 -1
- package/dist/cx.js.map +0 -1
- package/dist/deep-non-nullable-SmpSvoSd.d.ts +0 -8
- package/dist/dialog.js.map +0 -1
- package/dist/dropdown-menu.js.map +0 -1
- package/dist/icon-button-CT71Ti9V.d.ts +0 -96
- package/dist/icon.js.map +0 -1
- package/dist/kbd.js.map +0 -1
- package/dist/primitive-CBR_XmVa.d.ts +0 -14
- package/dist/select.js.map +0 -1
- package/dist/separator.js.map +0 -1
- package/dist/slot.js.map +0 -1
- package/dist/table.js.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/toast.js.map +0 -1
- package/dist/types-BuKAGhC-.d.ts +0 -7
- package/dist/types.js.map +0 -1
- package/dist/variant-props-oDo2u-We.d.ts +0 -11
- package/dist/with-style-props-VnLWm0Yd.d.ts +0 -27
package/dist/alert-dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { InfoIcon } from \"@phosphor-icons/react/Info\";\nimport { WarningIcon } from \"@phosphor-icons/react/Warning\";\nimport {\n\ttype ComponentProps,\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\ttype ReactNode,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseMemo,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Button, type ButtonPriority, type ButtonProps } from \"../button/button.js\";\nimport * as AlertDialogPrimitive from \"../dialog/primitive.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\nimport type { SvgAttributes } from \"../icon/types.js\";\nimport { Slot } from \"../slot/index.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\nconst priorities = [\"info\", \"danger\"] as const;\ntype Priority = (typeof priorities)[number];\n\ntype AlertDialogContextValue = {\n\tpriority: Priority;\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nfunction useAlertDialogContext() {\n\tconst context = useContext(AlertDialogContext);\n\tinvariant(context, \"AlertDialog child component used outside of AlertDialog parent!\");\n\treturn context;\n}\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root> & {\n\t/**\n\t * Indicates the importance or impact level of the AlertDialog, affecting its\n\t * color and styling to communicate its purpose to the user.\n\t */\n\tpriority: Priority;\n};\n\n/**\n * A modal dialog that interrupts the user with important content and expects a\n * response.\n * The root stateful component for the Alert Dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nfunction Root({ priority, ...props }: AlertDialogProps) {\n\tconst context: AlertDialogContextValue = useMemo(() => ({ priority }), [priority]);\n\n\treturn (\n\t\t<AlertDialogContext.Provider value={context}>\n\t\t\t<AlertDialogPrimitive.Root {...props} />\n\t\t</AlertDialogContext.Provider>\n\t);\n}\nRoot.displayName = \"AlertDialog\";\n\n/**\n * A button that opens the Alert Dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Trigger = AlertDialogPrimitive.Trigger;\nTrigger.displayName = \"AlertDialogTrigger\";\n\n/**\n * The portal for the Alert Dialog.\n *\n * @private\n */\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\nAlertDialogPortal.displayName = \"AlertDialogPortal\";\n\n/**\n * A layer that covers the inert portion of the view when the dialog is open.\n *\n * @private\n */\nconst AlertDialogOverlay = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-xs\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\n\ntype AlertDialogContentProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {\n\t/**\n\t * The preferred width of the `AlertDialogContent` as a tailwind `max-w-` class.\n\t *\n\t * By default, a `AlertDialog`'s content width is responsive with a default\n\t * preferred width: the maximum width of the `AlertDialogContent`\n\t *\n\t * @default `max-w-md`\n\t */\n\tpreferredWidth?: `max-w-${string}`;\n};\n\n/**\n * The popover alert dialog container.\n *\n * Renders on top of the overlay and is centered in the viewport.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcontent\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Content>,\n\tAlertDialogContentProps\n>(\n\t(\n\t\t{ className, onInteractOutside, onPointerDownOutside, preferredWidth = \"max-w-md\", ...props },\n\t\tref,\n\t) => (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start\",\n\t\t\t\t\t\t\"outline-hidden focus-within:outline-hidden\",\n\t\t\t\t\t\t\"p-6\",\n\t\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\tpreferredWidth,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</AlertDialogPortal>\n\t),\n);\nContent.displayName = \"AlertDialogContent\";\n\n/**\n * Contains the main content of the alert dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Body = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\n\t({ asChild = false, className, ...props }, ref) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\n\t\treturn <Component className={cx(\"flex-1 space-y-4\", className)} ref={ref} {...props} />;\n\t},\n);\nBody.displayName = \"AlertDialogBody\";\n\n/**\n * Contains the header content of the dialog, including the title and description.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogheader\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Header = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\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(\"flex flex-col space-y-2 text-center sm:text-start\", className)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nHeader.displayName = \"AlertDialogHeader\";\n\n/**\n * Contains the footer content of the dialog, including the action and cancel buttons.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogfooter\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Footer = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\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(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nFooter.displayName = \"AlertDialogFooter\";\n\n/**\n * An accessible name to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-label` or `aria-labelledby` to\n * `AlertDialogContent` and exclude this component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Title = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong text-center text-lg font-medium sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nTitle.displayName = \"AlertDialogTitle\";\n\n/**\n * An accessible description to be announced when the dialog is opened.\n * Renders as a `div` by default, but can be changed to any other element using\n * the `asChild` prop.\n *\n * Alternatively, you can provide `aria-describedby` to `AlertDialogContent` and\n * exclude this component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogdescription\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Description = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-center text-sm font-normal sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nDescription.displayName = \"AlertDialogDescription\";\n\n/**\n * A button that confirms the Alert Dialog action.\n * Will default to appearance=\"filled\", as well as the priority color from the `AlertDialog`.\n * Does not close the alert dialog by default.\n *\n * These buttons should be distinguished visually from the AlertDialogCancel button.\n *\n * Composes around the mantle Button component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Action = forwardRef<ComponentRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"filled\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tlet buttonPriority: NonNullable<ButtonPriority> = \"default\";\n\t\tif (ctx.priority === \"danger\") {\n\t\t\tbuttonPriority = \"danger\";\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t//\n\t\t\t\tappearance={appearance}\n\t\t\t\tpriority={buttonPriority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAction.displayName = \"AlertDialogAction\";\n\n/**\n * A button that closes the dialog and cancels the action.\n * Will default to appearance=\"outlined\" and priority=\"neutral\".\n *\n * This button should be distinguished visually from AlertDialogAction buttons.\n *\n * Composes around the mantle Button component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Cancel = forwardRef<ComponentRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"outlined\",\n\t\t\tclassName,\n\t\t\tpriority = \"neutral\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<AlertDialogPrimitive.Close asChild>\n\t\t\t<Button\n\t\t\t\tappearance={appearance}\n\t\t\t\tclassName={cx(\"mt-2 sm:mt-0\", className)}\n\t\t\t\tpriority={priority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPrimitive.Close>\n\t),\n);\nCancel.displayName = \"AlertDialogCancel\";\n\ntype AlertDialogIconProps = Omit<SvgAttributes, \"children\"> & {\n\tsvg?: ReactNode;\n};\n\n/**\n * An icon that visually represents the priority of the AlertDialog.\n *\n * Defaults to a warning icon for danger priority and an info icon for info\n * priority with the appropriate color.\n *\n * Can be overridden with a custom icon using the `svg` prop.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogicon\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Icon = forwardRef<ComponentRef<\"svg\">, AlertDialogIconProps>(\n\t({ className, svg, ...props }, ref) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tconst defaultColor = ctx.priority === \"danger\" ? \"text-danger-600\" : \"text-accent-600\";\n\t\tconst defaultIcon = ctx.priority === \"danger\" ? <WarningIcon /> : <InfoIcon />;\n\n\t\treturn (\n\t\t\t<SvgOnly\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\"size-12 sm:size-7\", defaultColor, className)}\n\t\t\t\tsvg={svg ?? defaultIcon}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nIcon.displayName = \"AlertDialogIcon\";\n\n/**\n * A button that closes the Alert Dialog. (Unstyled)\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogclose\n *\n * @example\n * ```tsx\n * <AlertDialog.Close asChild>\n * <AlertDialog.Action\n * type=\"button\"\n * onClick={() => doThing()}\n * >\n * Do thing and close\n * </AlertDialog.Action>\n * </AlertDialog.Close>\n */\nconst Close = AlertDialogPrimitive.Close;\nClose.displayName = \"AlertDialogClose\";\n\n/**\n * A modal dialog that interrupts the user with important content and expects a\n * response.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst AlertDialog = {\n\t/**\n\t * A modal dialog that interrupts the user with important content and expects a response.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Root priority=\"danger\">\n\t * <AlertDialog.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Show Alert Dialog\n\t * </Button>\n\t * </AlertDialog.Trigger>\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * </AlertDialog.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * A button that confirms the Alert Dialog action.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tAction,\n\t/**\n\t * Contains the main content of the alert dialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tBody,\n\t/**\n\t * A button that closes the dialog and cancels the action.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tCancel,\n\t/**\n\t * A button that closes the Alert Dialog. (Unstyled)\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogclose\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Close asChild>\n\t * <AlertDialog.Action\n\t * type=\"button\"\n\t * onClick={() => doThing()}\n\t * >\n\t * Do thing and close\n\t * </AlertDialog.Action>\n\t * </AlertDialog.Close>\n\t * ```\n\t */\n\tClose,\n\t/**\n\t * The popover alert dialog container.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * An accessible description to be announced when the dialog is opened.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogdescription\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tDescription,\n\t/**\n\t * Contains the footer content of the dialog, including the action and cancel buttons.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogfooter\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tFooter,\n\t/**\n\t * Contains the header content of the dialog, including the title and description.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogheader\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tHeader,\n\t/**\n\t * An icon that visually represents the priority of the AlertDialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogicon\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tIcon,\n\t/**\n\t * An accessible name to be announced when the dialog is opened.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tTitle,\n\t/**\n\t * A button that opens the Alert Dialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Show Alert Dialog\n\t * </Button>\n\t * </AlertDialog.Trigger>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tAlertDialog,\n};\n"],"mappings":"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","names":["InfoIcon","WarningIcon","createContext","forwardRef","useContext","useMemo","invariant","jsx","jsxs","AlertDialogContext","createContext","useAlertDialogContext","context","useContext","invariant","Root","priority","props","useMemo","jsx","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","forwardRef","className","ref","Overlay","cx","Content","onInteractOutside","onPointerDownOutside","preferredWidth","jsxs","event","preventCloseOnPromptInteraction","Body","asChild","Slot","Header","Footer","Title","Description","Action","appearance","ctx","buttonPriority","Button","Cancel","Close","Icon","svg","defaultColor","defaultIcon","WarningIcon","InfoIcon","SvgOnly","AlertDialog"]}
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive.Root","AlertDialogPrimitive.Trigger","AlertDialogPrimitive.Portal","AlertDialogPrimitive.Overlay","AlertDialogPrimitive.Content","AlertDialogPrimitive.Title","AlertDialogPrimitive.Description","AlertDialogPrimitive.Close"],"sources":["../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { InfoIcon } from \"@phosphor-icons/react/Info\";\nimport { WarningIcon } from \"@phosphor-icons/react/Warning\";\nimport {\n\ttype ComponentProps,\n\ttype ComponentPropsWithoutRef,\n\ttype ComponentRef,\n\ttype ReactNode,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseMemo,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Button, type ButtonPriority, type ButtonProps } from \"../button/button.js\";\nimport * as AlertDialogPrimitive from \"../dialog/primitive.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\nimport type { SvgAttributes } from \"../icon/types.js\";\nimport { Slot } from \"../slot/index.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\nconst priorities = [\"info\", \"danger\"] as const;\ntype Priority = (typeof priorities)[number];\n\ntype AlertDialogContextValue = {\n\tpriority: Priority;\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nfunction useAlertDialogContext() {\n\tconst context = useContext(AlertDialogContext);\n\tinvariant(context, \"AlertDialog child component used outside of AlertDialog parent!\");\n\treturn context;\n}\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root> & {\n\t/**\n\t * Indicates the importance or impact level of the AlertDialog, affecting its\n\t * color and styling to communicate its purpose to the user.\n\t */\n\tpriority: Priority;\n};\n\n/**\n * A modal dialog that interrupts the user with important content and expects a\n * response.\n * The root stateful component for the Alert Dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nfunction Root({ priority, ...props }: AlertDialogProps) {\n\tconst context: AlertDialogContextValue = useMemo(() => ({ priority }), [priority]);\n\n\treturn (\n\t\t<AlertDialogContext.Provider value={context}>\n\t\t\t<AlertDialogPrimitive.Root {...props} />\n\t\t</AlertDialogContext.Provider>\n\t);\n}\nRoot.displayName = \"AlertDialog\";\n\n/**\n * A button that opens the Alert Dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Trigger = AlertDialogPrimitive.Trigger;\nTrigger.displayName = \"AlertDialogTrigger\";\n\n/**\n * The portal for the Alert Dialog.\n *\n * @private\n */\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\nAlertDialogPortal.displayName = \"AlertDialogPortal\";\n\n/**\n * A layer that covers the inert portion of the view when the dialog is open.\n *\n * @private\n */\nconst AlertDialogOverlay = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-xs\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\n\ntype AlertDialogContentProps = ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {\n\t/**\n\t * The preferred width of the `AlertDialogContent` as a tailwind `max-w-` class.\n\t *\n\t * By default, a `AlertDialog`'s content width is responsive with a default\n\t * preferred width: the maximum width of the `AlertDialogContent`\n\t *\n\t * @default `max-w-md`\n\t */\n\tpreferredWidth?: `max-w-${string}`;\n};\n\n/**\n * The popover alert dialog container.\n *\n * Renders on top of the overlay and is centered in the viewport.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcontent\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Content>,\n\tAlertDialogContentProps\n>(\n\t(\n\t\t{ className, onInteractOutside, onPointerDownOutside, preferredWidth = \"max-w-md\", ...props },\n\t\tref,\n\t) => (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\t\tdata-mantle-modal-content\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start\",\n\t\t\t\t\t\t\"outline-hidden focus-within:outline-hidden\",\n\t\t\t\t\t\t\"p-6\",\n\t\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\tpreferredWidth,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</AlertDialogPortal>\n\t),\n);\nContent.displayName = \"AlertDialogContent\";\n\n/**\n * Contains the main content of the alert dialog.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Body = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\n\t({ asChild = false, className, ...props }, ref) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\n\t\treturn <Component className={cx(\"flex-1 space-y-4\", className)} ref={ref} {...props} />;\n\t},\n);\nBody.displayName = \"AlertDialogBody\";\n\n/**\n * Contains the header content of the dialog, including the title and description.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogheader\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Header = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\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(\"flex flex-col space-y-2 text-center sm:text-start\", className)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nHeader.displayName = \"AlertDialogHeader\";\n\n/**\n * Contains the footer content of the dialog, including the action and cancel buttons.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogfooter\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Footer = forwardRef<ComponentRef<\"div\">, ComponentProps<\"div\"> & WithAsChild>(\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(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nFooter.displayName = \"AlertDialogFooter\";\n\n/**\n * An accessible name to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-label` or `aria-labelledby` to\n * `AlertDialogContent` and exclude this component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Title = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong text-center text-lg font-medium sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nTitle.displayName = \"AlertDialogTitle\";\n\n/**\n * An accessible description to be announced when the dialog is opened.\n * Renders as a `div` by default, but can be changed to any other element using\n * the `asChild` prop.\n *\n * Alternatively, you can provide `aria-describedby` to `AlertDialogContent` and\n * exclude this component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogdescription\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Description = forwardRef<\n\tComponentRef<typeof AlertDialogPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-center text-sm font-normal sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nDescription.displayName = \"AlertDialogDescription\";\n\n/**\n * A button that confirms the Alert Dialog action.\n * Will default to appearance=\"filled\", as well as the priority color from the `AlertDialog`.\n * Does not close the alert dialog by default.\n *\n * These buttons should be distinguished visually from the AlertDialogCancel button.\n *\n * Composes around the mantle Button component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Action = forwardRef<ComponentRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"filled\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tlet buttonPriority: NonNullable<ButtonPriority> = \"default\";\n\t\tif (ctx.priority === \"danger\") {\n\t\t\tbuttonPriority = \"danger\";\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t//\n\t\t\t\tappearance={appearance}\n\t\t\t\tpriority={buttonPriority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAction.displayName = \"AlertDialogAction\";\n\n/**\n * A button that closes the dialog and cancels the action.\n * Will default to appearance=\"outlined\" and priority=\"neutral\".\n *\n * This button should be distinguished visually from AlertDialogAction buttons.\n *\n * Composes around the mantle Button component.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Cancel = forwardRef<ComponentRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"outlined\",\n\t\t\tclassName,\n\t\t\tpriority = \"neutral\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<AlertDialogPrimitive.Close asChild>\n\t\t\t<Button\n\t\t\t\tappearance={appearance}\n\t\t\t\tclassName={cx(\"mt-2 sm:mt-0\", className)}\n\t\t\t\tpriority={priority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPrimitive.Close>\n\t),\n);\nCancel.displayName = \"AlertDialogCancel\";\n\ntype AlertDialogIconProps = Omit<SvgAttributes, \"children\"> & {\n\tsvg?: ReactNode;\n};\n\n/**\n * An icon that visually represents the priority of the AlertDialog.\n *\n * Defaults to a warning icon for danger priority and an info icon for info\n * priority with the appropriate color.\n *\n * Can be overridden with a custom icon using the `svg` prop.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogicon\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst Icon = forwardRef<ComponentRef<\"svg\">, AlertDialogIconProps>(\n\t({ className, svg, ...props }, ref) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tconst defaultColor = ctx.priority === \"danger\" ? \"text-danger-600\" : \"text-accent-600\";\n\t\tconst defaultIcon = ctx.priority === \"danger\" ? <WarningIcon /> : <InfoIcon />;\n\n\t\treturn (\n\t\t\t<SvgOnly\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\"size-12 sm:size-7\", defaultColor, className)}\n\t\t\t\tsvg={svg ?? defaultIcon}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nIcon.displayName = \"AlertDialogIcon\";\n\n/**\n * A button that closes the Alert Dialog. (Unstyled)\n *\n * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogclose\n *\n * @example\n * ```tsx\n * <AlertDialog.Close asChild>\n * <AlertDialog.Action\n * type=\"button\"\n * onClick={() => doThing()}\n * >\n * Do thing and close\n * </AlertDialog.Action>\n * </AlertDialog.Close>\n */\nconst Close = AlertDialogPrimitive.Close;\nClose.displayName = \"AlertDialogClose\";\n\n/**\n * A modal dialog that interrupts the user with important content and expects a\n * response.\n *\n * @see https://mantle.ngrok.com/components/alert-dialog\n *\n * @example\n * ```tsx\n * <AlertDialog.Root priority=\"danger\">\n * <AlertDialog.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Show Danger Alert Dialog\n * </Button>\n * </AlertDialog.Trigger>\n * <AlertDialog.Content>\n * <AlertDialog.Icon />\n * <AlertDialog.Body>\n * <AlertDialog.Header>\n * <AlertDialog.Title>\n * Are you absolutely sure?\n * </AlertDialog.Title>\n * <AlertDialog.Description>\n * Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.\n * </AlertDialog.Description>\n * </AlertDialog.Header>\n * <AlertDialog.Footer>\n * <AlertDialog.Cancel type=\"button\">Cancel</AlertDialog.Cancel>\n * <AlertDialog.Action type=\"button\">\n * Continue\n * </AlertDialog.Action>\n * </AlertDialog.Footer>\n * </AlertDialog.Body>\n * </AlertDialog.Content>\n * </AlertDialog.Root>\n * ```\n */\nconst AlertDialog = {\n\t/**\n\t * A modal dialog that interrupts the user with important content and expects a response.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Root priority=\"danger\">\n\t * <AlertDialog.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Show Alert Dialog\n\t * </Button>\n\t * </AlertDialog.Trigger>\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * </AlertDialog.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * A button that confirms the Alert Dialog action.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tAction,\n\t/**\n\t * Contains the main content of the alert dialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tBody,\n\t/**\n\t * A button that closes the dialog and cancels the action.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tCancel,\n\t/**\n\t * A button that closes the Alert Dialog. (Unstyled)\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogclose\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Close asChild>\n\t * <AlertDialog.Action\n\t * type=\"button\"\n\t * onClick={() => doThing()}\n\t * >\n\t * Do thing and close\n\t * </AlertDialog.Action>\n\t * </AlertDialog.Close>\n\t * ```\n\t */\n\tClose,\n\t/**\n\t * The popover alert dialog container.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcontent\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * An accessible description to be announced when the dialog is opened.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogdescription\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tDescription,\n\t/**\n\t * Contains the footer content of the dialog, including the action and cancel buttons.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogfooter\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Footer>\n\t * <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>\n\t * <AlertDialog.Action>Continue</AlertDialog.Action>\n\t * </AlertDialog.Footer>\n\t * ```\n\t */\n\tFooter,\n\t/**\n\t * Contains the header content of the dialog, including the title and description.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogheader\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tHeader,\n\t/**\n\t * An icon that visually represents the priority of the AlertDialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogicon\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Content>\n\t * <AlertDialog.Icon />\n\t * <AlertDialog.Body>\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * </AlertDialog.Body>\n\t * </AlertDialog.Content>\n\t * ```\n\t */\n\tIcon,\n\t/**\n\t * An accessible name to be announced when the dialog is opened.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Header>\n\t * <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>\n\t * <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>\n\t * </AlertDialog.Header>\n\t * ```\n\t */\n\tTitle,\n\t/**\n\t * A button that opens the Alert Dialog.\n\t *\n\t * @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <AlertDialog.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Show Alert Dialog\n\t * </Button>\n\t * </AlertDialog.Trigger>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tAlertDialog,\n};\n"],"mappings":"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"}
|
package/dist/alert.d.ts
CHANGED
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import 'class-variance-authority/types';
|
|
8
|
-
import './variant-props-oDo2u-We.js';
|
|
9
|
-
import 'class-variance-authority';
|
|
10
|
-
import './deep-non-nullable-SmpSvoSd.js';
|
|
1
|
+
import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
|
|
2
|
+
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
3
|
+
import { n as IconButtonProps } from "./icon-button-2r6S3HVA.js";
|
|
4
|
+
import * as react from "react";
|
|
5
|
+
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
6
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
11
7
|
|
|
8
|
+
//#region src/components/alert/alert.d.ts
|
|
12
9
|
declare const priorities: readonly ["danger", "info", "success", "warning"];
|
|
13
10
|
type Priority = (typeof priorities)[number];
|
|
14
11
|
declare const appearances: readonly ["banner", "default"];
|
|
15
12
|
type Appearance = (typeof appearances)[number];
|
|
16
13
|
type AlertProps = ComponentProps<"div"> & {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Indicates the importance or impact level of the Alert, affecting its
|
|
16
|
+
* color and styling to communicate its purpose to the user.
|
|
17
|
+
*/
|
|
18
|
+
priority: Priority;
|
|
19
|
+
/**
|
|
20
|
+
* Controls the visual style of the Alert.
|
|
21
|
+
* - "default" provides standard rounded corners and borders.
|
|
22
|
+
* - "banner" creates a banner-style alert with no rounded corners, sticky positioning, and no left/right borders.
|
|
23
|
+
*
|
|
24
|
+
* @default "default"
|
|
25
|
+
*/
|
|
26
|
+
appearance?: Appearance;
|
|
30
27
|
};
|
|
31
28
|
type AlertIconProps = Omit<SvgAttributes, "children"> & {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
/**
|
|
30
|
+
* An optional icon that renders in place of the default icon for the Alert priority.
|
|
31
|
+
*/
|
|
32
|
+
svg?: ReactNode;
|
|
36
33
|
};
|
|
37
34
|
type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
|
|
38
35
|
type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "icon">> & {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
/**
|
|
37
|
+
* An optional icon to render inside the dismiss button. Defaults to an X icon.
|
|
38
|
+
*/
|
|
39
|
+
icon?: ReactNode;
|
|
43
40
|
};
|
|
44
41
|
/**
|
|
45
42
|
* Displays a callout for user attention.
|
|
@@ -61,112 +58,122 @@ type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "icon">> & {
|
|
|
61
58
|
*```
|
|
62
59
|
*/
|
|
63
60
|
declare const Alert: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
61
|
+
/**
|
|
62
|
+
* The root container of the alert component.
|
|
63
|
+
*
|
|
64
|
+
* @see https://mantle.ngrok.com/components/alert#alertroot
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Alert.Root priority="info">
|
|
69
|
+
* <Alert.Icon />
|
|
70
|
+
* <Alert.Content>
|
|
71
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
72
|
+
* <Alert.Description>Alert description</Alert.Description>
|
|
73
|
+
* </Alert.Content>
|
|
74
|
+
* </Alert.Root>
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
readonly Root: react.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* The container for the content slot of an alert.
|
|
80
|
+
*
|
|
81
|
+
* @see https://mantle.ngrok.com/components/alert#alertcontent
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```tsx
|
|
85
|
+
* <Alert.Root priority="info">
|
|
86
|
+
* <Alert.Icon />
|
|
87
|
+
* <Alert.Content>
|
|
88
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
89
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
90
|
+
* </Alert.Content>
|
|
91
|
+
* </Alert.Root>
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
readonly Content: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
/**
|
|
96
|
+
* The optional description of an alert.
|
|
97
|
+
*
|
|
98
|
+
* @see https://mantle.ngrok.com/components/alert#alertdescription
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <Alert.Root priority="info">
|
|
103
|
+
* <Alert.Icon />
|
|
104
|
+
* <Alert.Content>
|
|
105
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
106
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
107
|
+
* </Alert.Content>
|
|
108
|
+
* </Alert.Root>
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
readonly Description: react.ForwardRefExoticComponent<Omit<AlertDescriptionProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
112
|
+
/**
|
|
113
|
+
* An optional dismiss button that can be used to close the alert.
|
|
114
|
+
*
|
|
115
|
+
* @see https://mantle.ngrok.com/components/alert#alertdismissiconbutton
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```tsx
|
|
119
|
+
* <Alert.Root priority="info">
|
|
120
|
+
* <Alert.Icon />
|
|
121
|
+
* <Alert.Content>
|
|
122
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
123
|
+
* <Alert.DismissIconButton />
|
|
124
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
125
|
+
* </Alert.Content>
|
|
126
|
+
* </Alert.Root>
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
readonly DismissIconButton: {
|
|
130
|
+
({
|
|
131
|
+
size,
|
|
132
|
+
type,
|
|
133
|
+
label,
|
|
134
|
+
appearance,
|
|
135
|
+
className,
|
|
136
|
+
icon,
|
|
137
|
+
style,
|
|
138
|
+
...props
|
|
139
|
+
}: AlertDismissIconButtonProps): react_jsx_runtime0.JSX.Element;
|
|
140
|
+
displayName: string;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* An optional icon that visually represents the priority of the Alert.
|
|
144
|
+
*
|
|
145
|
+
* @see https://mantle.ngrok.com/components/alert#alerticon
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```tsx
|
|
149
|
+
* <Alert.Root priority="info">
|
|
150
|
+
* <Alert.Icon />
|
|
151
|
+
* <Alert.Content>
|
|
152
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
153
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
154
|
+
* </Alert.Content>
|
|
155
|
+
* </Alert.Root>
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
readonly Icon: react.ForwardRefExoticComponent<Omit<AlertIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
159
|
+
/**
|
|
160
|
+
* The title of an alert.
|
|
161
|
+
*
|
|
162
|
+
* @see https://mantle.ngrok.com/components/alert#alerttitle
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```tsx
|
|
166
|
+
* <Alert.Root priority="info">
|
|
167
|
+
* <Alert.Icon />
|
|
168
|
+
* <Alert.Content>
|
|
169
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
170
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
171
|
+
* </Alert.Content>
|
|
172
|
+
* </Alert.Root>
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
readonly Title: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & WithAsChild & react.RefAttributes<HTMLHeadingElement>>;
|
|
170
176
|
};
|
|
171
|
-
|
|
177
|
+
//#endregion
|
|
172
178
|
export { Alert };
|
|
179
|
+
//# sourceMappingURL=alert.d.ts.map
|
package/dist/alert.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./cx-bKromGBh.js";import{t}from"./svg-only-BVLlbQ4e.js";import{t as n}from"./types-884RJJqm.js";import{t as r}from"./slot-DdnjeV2n.js";import{t as i}from"./icon-button-D4e9-dq-.js";import{createContext as a,forwardRef as o,useContext as s,useMemo as c}from"react";import l from"tiny-invariant";import{jsx as u}from"react/jsx-runtime";import{CheckCircleIcon as d}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as f}from"@phosphor-icons/react/Info";import{WarningIcon as p}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as m}from"@phosphor-icons/react/WarningDiamond";import{XIcon as h}from"@phosphor-icons/react/X";import{cva as g}from"class-variance-authority";const _=a(null);function v(){let e=s(_);return l(e,`useAlertContext hook used outside of Alert parent!`),e}const y=g(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{priority:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700`,info:`border-info-500/50 bg-info-500/10 text-info-700`,success:`border-success-500/50 bg-success-500/10 text-success-700`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}},compoundVariants:[{priority:`danger`,appearance:`banner`,className:``},{priority:`info`,appearance:`banner`,className:``},{priority:`success`,appearance:`banner`,className:``},{priority:`warning`,appearance:`banner`,className:``}]}),b=o(({appearance:t=`default`,className:n,priority:r,...i},a)=>{let o=c(()=>({priority:r}),[r]);return u(_.Provider,{value:o,children:u(`div`,{ref:a,className:e(y({appearance:t,priority:r}),n),...i})})});b.displayName=`Alert`;const x={danger:u(p,{}),info:u(f,{}),success:u(d,{}),warning:u(m,{})},S=o(({className:n,svg:r,...i},a)=>{let o=x[v().priority];return u(t,{ref:a,className:e(`size-5`,n),svg:r??o,...i})});S.displayName=`AlertIcon`;const C=o(({className:t,...n},r)=>u(`div`,{ref:r,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...n}));C.displayName=`AlertContent`;const w=o(({asChild:t=!1,className:n,...i},a)=>u(t?r:`h5`,{ref:a,className:e(`font-medium`,n),...i}));w.displayName=`AlertTitle`;const T=o(({asChild:t=!1,className:n,...i},a)=>u(t?r:`div`,{ref:a,className:e(`text-sm`,n),...i}));T.displayName=`AlertDescription`;const E=e=>`var(--color-${e}-700)`,D=e=>`var(--color-${e}-800)`,O=e=>`var(--color-${e}-900)`,k=({size:t=`sm`,type:r=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=u(h,{}),style:l,...d})=>{let f=v();return u(i,{appearance:o,icon:c,label:a,size:t,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-(--alert-dismiss-icon-color)`,`not-disabled:hover:text-(--alert-dismiss-icon-hover-color)`,`not-disabled:active:text-(--alert-dismiss-icon-active-color)`,s),type:r,style:n({...l,"--alert-dismiss-icon-color":E(f.priority),"--alert-dismiss-icon-hover-color":D(f.priority),"--alert-dismiss-icon-active-color":O(f.priority)}),...d})};k.displayName=`AlertDismissIconButton`;const A={Root:b,Content:C,Description:T,DismissIconButton:k,Icon:S,Title:w};export{A as Alert};
|
|
2
2
|
//# sourceMappingURL=alert.js.map
|