@ngrok/mantle 0.66.0 → 0.66.2
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-QPyyfLaB.js +2 -0
- package/dist/browser-only-QPyyfLaB.js.map +1 -0
- package/dist/browser-only.d.ts +20 -15
- package/dist/browser-only.js +1 -2
- package/dist/button-B6StZJsz.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-Cr5u0Eai.js +2 -0
- package/dist/dialog-Cr5u0Eai.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 +72 -59
- 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 +226 -218
- package/dist/multi-select.js +1 -1
- package/dist/multi-select.js.map +1 -1
- 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-Cath9ASB.js +2 -0
- package/dist/primitive-Cath9ASB.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-C8F5nFrJ.js +2 -0
- package/dist/theme-provider-C8F5nFrJ.js.map +1 -0
- package/dist/theme.d.ts +66 -39
- package/dist/theme.js +1 -2
- package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
- package/dist/toast-1AuBbrBS.js +2 -0
- package/dist/toast-1AuBbrBS.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-CojcYxlA.js +2 -0
- package/dist/use-matches-media-query-CojcYxlA.js.map +1 -0
- package/dist/use-prefers-reduced-motion-BiG6QGkf.js +2 -0
- package/dist/use-prefers-reduced-motion-BiG6QGkf.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 +6 -6
- 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-2FYR6IJV.js +0 -2
- package/dist/chunk-2FYR6IJV.js.map +0 -1
- package/dist/chunk-5VDCC3YW.js +0 -2
- package/dist/chunk-5VDCC3YW.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-ELZLLG6G.js +0 -2
- package/dist/chunk-ELZLLG6G.js.map +0 -1
- package/dist/chunk-EVU5XGB4.js +0 -2
- package/dist/chunk-EVU5XGB4.js.map +0 -1
- package/dist/chunk-EYZYDUS2.js +0 -2
- package/dist/chunk-EYZYDUS2.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-LBO5LEYM.js +0 -2
- package/dist/chunk-LBO5LEYM.js.map +0 -1
- package/dist/chunk-MLXONRJD.js +0 -2
- package/dist/chunk-MLXONRJD.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-SGGOH2WW.js +0 -2
- package/dist/chunk-SGGOH2WW.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.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import * as react from
|
|
6
|
-
import { ComponentProps, ReactNode } from
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
1
|
+
import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
|
|
2
|
+
import { t as DeepNonNullable } from "./deep-non-nullable-BLM3Gz0I.js";
|
|
3
|
+
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
4
|
+
import { t as Root$1 } from "./primitive-tuHqhoRE.js";
|
|
5
|
+
import * as react from "react";
|
|
6
|
+
import { ComponentProps, ReactNode } from "react";
|
|
7
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
import * as class_variance_authority0 from "class-variance-authority";
|
|
9
|
+
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
10
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
11
11
|
|
|
12
|
+
//#region src/components/alert-dialog/alert-dialog.d.ts
|
|
12
13
|
declare const priorities: readonly ["info", "danger"];
|
|
13
14
|
type Priority = (typeof priorities)[number];
|
|
14
15
|
type AlertDialogProps = ComponentProps<typeof Root$1> & {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Indicates the importance or impact level of the AlertDialog, affecting its
|
|
18
|
+
* color and styling to communicate its purpose to the user.
|
|
19
|
+
*/
|
|
20
|
+
priority: Priority;
|
|
20
21
|
};
|
|
21
22
|
/**
|
|
22
23
|
* A modal dialog that interrupts the user with important content and expects a
|
|
@@ -55,12 +56,15 @@ type AlertDialogProps = ComponentProps<typeof Root$1> & {
|
|
|
55
56
|
* </AlertDialog.Root>
|
|
56
57
|
* ```
|
|
57
58
|
*/
|
|
58
|
-
declare function Root({
|
|
59
|
+
declare function Root({
|
|
60
|
+
priority,
|
|
61
|
+
...props
|
|
62
|
+
}: AlertDialogProps): react_jsx_runtime0.JSX.Element;
|
|
59
63
|
declare namespace Root {
|
|
60
|
-
|
|
64
|
+
var displayName: string;
|
|
61
65
|
}
|
|
62
66
|
type AlertDialogIconProps = Omit<SvgAttributes, "children"> & {
|
|
63
|
-
|
|
67
|
+
svg?: ReactNode;
|
|
64
68
|
};
|
|
65
69
|
/**
|
|
66
70
|
* A modal dialog that interrupts the user with important content and expects a
|
|
@@ -99,268 +103,269 @@ type AlertDialogIconProps = Omit<SvgAttributes, "children"> & {
|
|
|
99
103
|
* ```
|
|
100
104
|
*/
|
|
101
105
|
declare const AlertDialog: {
|
|
106
|
+
/**
|
|
107
|
+
* A modal dialog that interrupts the user with important content and expects a response.
|
|
108
|
+
*
|
|
109
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```tsx
|
|
113
|
+
* <AlertDialog.Root priority="danger">
|
|
114
|
+
* <AlertDialog.Trigger asChild>
|
|
115
|
+
* <Button type="button" appearance="outlined">
|
|
116
|
+
* Show Alert Dialog
|
|
117
|
+
* </Button>
|
|
118
|
+
* </AlertDialog.Trigger>
|
|
119
|
+
* <AlertDialog.Content>
|
|
120
|
+
* <AlertDialog.Icon />
|
|
121
|
+
* <AlertDialog.Body>
|
|
122
|
+
* <AlertDialog.Header>
|
|
123
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
124
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
125
|
+
* </AlertDialog.Header>
|
|
126
|
+
* <AlertDialog.Footer>
|
|
127
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
128
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
129
|
+
* </AlertDialog.Footer>
|
|
130
|
+
* </AlertDialog.Body>
|
|
131
|
+
* </AlertDialog.Content>
|
|
132
|
+
* </AlertDialog.Root>
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
readonly Root: typeof Root;
|
|
136
|
+
/**
|
|
137
|
+
* A button that confirms the Alert Dialog action.
|
|
138
|
+
*
|
|
139
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```tsx
|
|
143
|
+
* <AlertDialog.Footer>
|
|
144
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
145
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
146
|
+
* </AlertDialog.Footer>
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
readonly Action: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
150
|
+
appearance?: "link" | "ghost" | "outlined" | "filled" | null | undefined;
|
|
151
|
+
isLoading?: boolean | null | undefined;
|
|
152
|
+
priority?: "danger" | "neutral" | "default" | null | undefined;
|
|
153
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
154
|
+
icon?: ReactNode;
|
|
155
|
+
iconPlacement?: "start" | "end";
|
|
156
|
+
} & {
|
|
157
|
+
asChild: true;
|
|
158
|
+
type?: ComponentProps<"button">["type"];
|
|
159
|
+
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
160
|
+
appearance?: "link" | "ghost" | "outlined" | "filled" | null | undefined;
|
|
161
|
+
isLoading?: boolean | null | undefined;
|
|
162
|
+
priority?: "danger" | "neutral" | "default" | null | undefined;
|
|
163
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
164
|
+
icon?: ReactNode;
|
|
165
|
+
iconPlacement?: "start" | "end";
|
|
166
|
+
} & {
|
|
167
|
+
asChild?: false | undefined;
|
|
168
|
+
type: Exclude<ComponentProps<"button">["type"], undefined>;
|
|
169
|
+
}, "ref">) & react.RefAttributes<HTMLButtonElement>>;
|
|
170
|
+
/**
|
|
171
|
+
* Contains the main content of the alert dialog.
|
|
172
|
+
*
|
|
173
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```tsx
|
|
177
|
+
* <AlertDialog.Content>
|
|
178
|
+
* <AlertDialog.Icon />
|
|
179
|
+
* <AlertDialog.Body>
|
|
180
|
+
* <AlertDialog.Header>
|
|
181
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
182
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
183
|
+
* </AlertDialog.Header>
|
|
184
|
+
* <AlertDialog.Footer>
|
|
185
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
186
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
187
|
+
* </AlertDialog.Footer>
|
|
188
|
+
* </AlertDialog.Body>
|
|
189
|
+
* </AlertDialog.Content>
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
readonly Body: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
193
|
+
/**
|
|
194
|
+
* A button that closes the dialog and cancels the action.
|
|
195
|
+
*
|
|
196
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```tsx
|
|
200
|
+
* <AlertDialog.Footer>
|
|
201
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
202
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
203
|
+
* </AlertDialog.Footer>
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
readonly Cancel: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
207
|
+
appearance?: "link" | "ghost" | "outlined" | "filled" | null | undefined;
|
|
208
|
+
isLoading?: boolean | null | undefined;
|
|
209
|
+
priority?: "danger" | "neutral" | "default" | null | undefined;
|
|
210
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
211
|
+
icon?: ReactNode;
|
|
212
|
+
iconPlacement?: "start" | "end";
|
|
213
|
+
} & {
|
|
214
|
+
asChild: true;
|
|
215
|
+
type?: ComponentProps<"button">["type"];
|
|
216
|
+
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
|
|
217
|
+
appearance?: "link" | "ghost" | "outlined" | "filled" | null | undefined;
|
|
218
|
+
isLoading?: boolean | null | undefined;
|
|
219
|
+
priority?: "danger" | "neutral" | "default" | null | undefined;
|
|
220
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
|
|
221
|
+
icon?: ReactNode;
|
|
222
|
+
iconPlacement?: "start" | "end";
|
|
223
|
+
} & {
|
|
224
|
+
asChild?: false | undefined;
|
|
225
|
+
type: Exclude<ComponentProps<"button">["type"], undefined>;
|
|
226
|
+
}, "ref">) & react.RefAttributes<HTMLButtonElement>>;
|
|
227
|
+
/**
|
|
228
|
+
* A button that closes the Alert Dialog. (Unstyled)
|
|
229
|
+
*
|
|
230
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogclose
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```tsx
|
|
234
|
+
* <AlertDialog.Close asChild>
|
|
235
|
+
* <AlertDialog.Action
|
|
236
|
+
* type="button"
|
|
237
|
+
* onClick={() => doThing()}
|
|
238
|
+
* >
|
|
239
|
+
* Do thing and close
|
|
240
|
+
* </AlertDialog.Action>
|
|
241
|
+
* </AlertDialog.Close>
|
|
242
|
+
* ```
|
|
243
|
+
*/
|
|
244
|
+
readonly Close: react.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
245
|
+
/**
|
|
246
|
+
* The popover alert dialog container.
|
|
247
|
+
*
|
|
248
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcontent
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* ```tsx
|
|
252
|
+
* <AlertDialog.Content>
|
|
253
|
+
* <AlertDialog.Icon />
|
|
254
|
+
* <AlertDialog.Body>
|
|
255
|
+
* <AlertDialog.Header>
|
|
256
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
257
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
258
|
+
* </AlertDialog.Header>
|
|
259
|
+
* <AlertDialog.Footer>
|
|
260
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
261
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
262
|
+
* </AlertDialog.Footer>
|
|
263
|
+
* </AlertDialog.Body>
|
|
264
|
+
* </AlertDialog.Content>
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
readonly Content: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
102
268
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogroot
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```tsx
|
|
109
|
-
* <AlertDialog.Root priority="danger">
|
|
110
|
-
* <AlertDialog.Trigger asChild>
|
|
111
|
-
* <Button type="button" appearance="outlined">
|
|
112
|
-
* Show Alert Dialog
|
|
113
|
-
* </Button>
|
|
114
|
-
* </AlertDialog.Trigger>
|
|
115
|
-
* <AlertDialog.Content>
|
|
116
|
-
* <AlertDialog.Icon />
|
|
117
|
-
* <AlertDialog.Body>
|
|
118
|
-
* <AlertDialog.Header>
|
|
119
|
-
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
120
|
-
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
121
|
-
* </AlertDialog.Header>
|
|
122
|
-
* <AlertDialog.Footer>
|
|
123
|
-
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
124
|
-
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
125
|
-
* </AlertDialog.Footer>
|
|
126
|
-
* </AlertDialog.Body>
|
|
127
|
-
* </AlertDialog.Content>
|
|
128
|
-
* </AlertDialog.Root>
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
readonly Root: typeof Root;
|
|
132
|
-
/**
|
|
133
|
-
* A button that confirms the Alert Dialog action.
|
|
134
|
-
*
|
|
135
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogaction
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```tsx
|
|
139
|
-
* <AlertDialog.Footer>
|
|
140
|
-
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
141
|
-
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
142
|
-
* </AlertDialog.Footer>
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
readonly Action: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
146
|
-
appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
|
|
147
|
-
isLoading?: boolean | null | undefined;
|
|
148
|
-
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
149
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & {
|
|
150
|
-
icon?: ReactNode;
|
|
151
|
-
iconPlacement?: "start" | "end";
|
|
152
|
-
} & {
|
|
153
|
-
asChild: true;
|
|
154
|
-
type?: ComponentProps<"button">["type"];
|
|
155
|
-
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
156
|
-
appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
|
|
157
|
-
isLoading?: boolean | null | undefined;
|
|
158
|
-
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
159
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & {
|
|
160
|
-
icon?: ReactNode;
|
|
161
|
-
iconPlacement?: "start" | "end";
|
|
162
|
-
} & {
|
|
163
|
-
asChild?: false | undefined;
|
|
164
|
-
type: Exclude<ComponentProps<"button">["type"], undefined>;
|
|
165
|
-
}, "ref">) & react.RefAttributes<HTMLButtonElement>>;
|
|
166
|
-
/**
|
|
167
|
-
* Contains the main content of the alert dialog.
|
|
168
|
-
*
|
|
169
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogbody
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```tsx
|
|
173
|
-
* <AlertDialog.Content>
|
|
174
|
-
* <AlertDialog.Icon />
|
|
175
|
-
* <AlertDialog.Body>
|
|
176
|
-
* <AlertDialog.Header>
|
|
177
|
-
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
178
|
-
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
179
|
-
* </AlertDialog.Header>
|
|
180
|
-
* <AlertDialog.Footer>
|
|
181
|
-
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
182
|
-
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
183
|
-
* </AlertDialog.Footer>
|
|
184
|
-
* </AlertDialog.Body>
|
|
185
|
-
* </AlertDialog.Content>
|
|
186
|
-
* ```
|
|
187
|
-
*/
|
|
188
|
-
readonly Body: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
189
|
-
/**
|
|
190
|
-
* A button that closes the dialog and cancels the action.
|
|
191
|
-
*
|
|
192
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogcancel
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```tsx
|
|
196
|
-
* <AlertDialog.Footer>
|
|
197
|
-
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
198
|
-
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
199
|
-
* </AlertDialog.Footer>
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
readonly Cancel: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
203
|
-
appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
|
|
204
|
-
isLoading?: boolean | null | undefined;
|
|
205
|
-
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
206
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & {
|
|
207
|
-
icon?: ReactNode;
|
|
208
|
-
iconPlacement?: "start" | "end";
|
|
209
|
-
} & {
|
|
210
|
-
asChild: true;
|
|
211
|
-
type?: ComponentProps<"button">["type"];
|
|
212
|
-
}, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority.VariantProps<(props?: ({
|
|
213
|
-
appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
|
|
214
|
-
isLoading?: boolean | null | undefined;
|
|
215
|
-
priority?: "default" | "danger" | "neutral" | null | undefined;
|
|
216
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string>>> & {
|
|
217
|
-
icon?: ReactNode;
|
|
218
|
-
iconPlacement?: "start" | "end";
|
|
219
|
-
} & {
|
|
220
|
-
asChild?: false | undefined;
|
|
221
|
-
type: Exclude<ComponentProps<"button">["type"], undefined>;
|
|
222
|
-
}, "ref">) & react.RefAttributes<HTMLButtonElement>>;
|
|
223
|
-
/**
|
|
224
|
-
* A button that closes the Alert Dialog. (Unstyled)
|
|
269
|
+
* The preferred width of the `AlertDialogContent` as a tailwind `max-w-` class.
|
|
225
270
|
*
|
|
226
|
-
*
|
|
271
|
+
* By default, a `AlertDialog`'s content width is responsive with a default
|
|
272
|
+
* preferred width: the maximum width of the `AlertDialogContent`
|
|
227
273
|
*
|
|
228
|
-
* @
|
|
229
|
-
* ```tsx
|
|
230
|
-
* <AlertDialog.Close asChild>
|
|
231
|
-
* <AlertDialog.Action
|
|
232
|
-
* type="button"
|
|
233
|
-
* onClick={() => doThing()}
|
|
234
|
-
* >
|
|
235
|
-
* Do thing and close
|
|
236
|
-
* </AlertDialog.Action>
|
|
237
|
-
* </AlertDialog.Close>
|
|
238
|
-
* ```
|
|
274
|
+
* @default `max-w-md`
|
|
239
275
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
* ```
|
|
333
|
-
*/
|
|
334
|
-
readonly Icon: react.ForwardRefExoticComponent<Omit<AlertDialogIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
335
|
-
/**
|
|
336
|
-
* An accessible name to be announced when the dialog is opened.
|
|
337
|
-
*
|
|
338
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle
|
|
339
|
-
*
|
|
340
|
-
* @example
|
|
341
|
-
* ```tsx
|
|
342
|
-
* <AlertDialog.Header>
|
|
343
|
-
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
344
|
-
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
345
|
-
* </AlertDialog.Header>
|
|
346
|
-
* ```
|
|
347
|
-
*/
|
|
348
|
-
readonly Title: react.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
349
|
-
/**
|
|
350
|
-
* A button that opens the Alert Dialog.
|
|
351
|
-
*
|
|
352
|
-
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger
|
|
353
|
-
*
|
|
354
|
-
* @example
|
|
355
|
-
* ```tsx
|
|
356
|
-
* <AlertDialog.Trigger asChild>
|
|
357
|
-
* <Button type="button" appearance="outlined">
|
|
358
|
-
* Show Alert Dialog
|
|
359
|
-
* </Button>
|
|
360
|
-
* </AlertDialog.Trigger>
|
|
361
|
-
* ```
|
|
362
|
-
*/
|
|
363
|
-
readonly Trigger: react.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
276
|
+
preferredWidth?: `max-w-${string}`;
|
|
277
|
+
} & react.RefAttributes<HTMLDivElement>>;
|
|
278
|
+
/**
|
|
279
|
+
* An accessible description to be announced when the dialog is opened.
|
|
280
|
+
*
|
|
281
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogdescription
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```tsx
|
|
285
|
+
* <AlertDialog.Header>
|
|
286
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
287
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
288
|
+
* </AlertDialog.Header>
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
readonly Description: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
292
|
+
/**
|
|
293
|
+
* Contains the footer content of the dialog, including the action and cancel buttons.
|
|
294
|
+
*
|
|
295
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogfooter
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```tsx
|
|
299
|
+
* <AlertDialog.Footer>
|
|
300
|
+
* <AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
301
|
+
* <AlertDialog.Action>Continue</AlertDialog.Action>
|
|
302
|
+
* </AlertDialog.Footer>
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
readonly Footer: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
306
|
+
/**
|
|
307
|
+
* Contains the header content of the dialog, including the title and description.
|
|
308
|
+
*
|
|
309
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogheader
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```tsx
|
|
313
|
+
* <AlertDialog.Header>
|
|
314
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
315
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
316
|
+
* </AlertDialog.Header>
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
readonly Header: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
320
|
+
/**
|
|
321
|
+
* An icon that visually represents the priority of the AlertDialog.
|
|
322
|
+
*
|
|
323
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogicon
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```tsx
|
|
327
|
+
* <AlertDialog.Content>
|
|
328
|
+
* <AlertDialog.Icon />
|
|
329
|
+
* <AlertDialog.Body>
|
|
330
|
+
* <AlertDialog.Header>
|
|
331
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
332
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
333
|
+
* </AlertDialog.Header>
|
|
334
|
+
* </AlertDialog.Body>
|
|
335
|
+
* </AlertDialog.Content>
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
readonly Icon: react.ForwardRefExoticComponent<Omit<AlertDialogIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
339
|
+
/**
|
|
340
|
+
* An accessible name to be announced when the dialog is opened.
|
|
341
|
+
*
|
|
342
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtitle
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* ```tsx
|
|
346
|
+
* <AlertDialog.Header>
|
|
347
|
+
* <AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title>
|
|
348
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
349
|
+
* </AlertDialog.Header>
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
readonly Title: react.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog0.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
353
|
+
/**
|
|
354
|
+
* A button that opens the Alert Dialog.
|
|
355
|
+
*
|
|
356
|
+
* @see https://mantle.ngrok.com/components/alert-dialog#alertdialogtrigger
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```tsx
|
|
360
|
+
* <AlertDialog.Trigger asChild>
|
|
361
|
+
* <Button type="button" appearance="outlined">
|
|
362
|
+
* Show Alert Dialog
|
|
363
|
+
* </Button>
|
|
364
|
+
* </AlertDialog.Trigger>
|
|
365
|
+
* ```
|
|
366
|
+
*/
|
|
367
|
+
readonly Trigger: react.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
364
368
|
};
|
|
365
|
-
|
|
369
|
+
//#endregion
|
|
366
370
|
export { AlertDialog };
|
|
371
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
package/dist/alert-dialog.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"./slot-DdnjeV2n.js";import{t as r}from"./button-CRRPesae.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./primitive-Cath9ASB.js";import{createContext as f,forwardRef as p,useContext as m,useMemo as h}from"react";import g from"tiny-invariant";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{InfoIcon as y}from"@phosphor-icons/react/Info";import{WarningIcon as b}from"@phosphor-icons/react/Warning";const x=f(null);function S(){let e=m(x);return g(e,`AlertDialog child component used outside of AlertDialog parent!`),e}function C({priority:e,...t}){let n=h(()=>({priority:e}),[e]);return _(x.Provider,{value:n,children:_(c,{...t})})}C.displayName=`AlertDialog`;const w=a;w.displayName=`AlertDialogTrigger`;const T=i;T.displayName=`AlertDialogPortal`;const E=p(({className:t,...n},r)=>_(o,{className:e(`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`,t),...n,ref:r}));E.displayName=`AlertDialogOverlay`;const D=p(({className:t,preferredWidth:n=`max-w-md`,...r},i)=>v(T,{children:[_(E,{}),_(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:_(s,{"data-mantle-modal-content":!0,ref:i,className:e(`flex w-full flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start`,`outline-hidden focus-within:outline-hidden`,`p-6`,`border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200`,`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),...r})})]}));D.displayName=`AlertDialogContent`;const O=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{className:e(`flex-1 space-y-4`,r),ref:a,...i}));O.displayName=`AlertDialogBody`;const k=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{className:e(`flex flex-col space-y-2 text-center sm:text-start`,r),ref:a,...i}));k.displayName=`AlertDialogHeader`;const A=p(({asChild:t=!1,className:r,...i},a)=>_(t?n:`div`,{className:e(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,r),ref:a,...i}));A.displayName=`AlertDialogFooter`;const j=p(({className:t,...n},r)=>_(u,{ref:r,className:e(`text-strong text-center text-lg font-medium sm:text-start`,t),...n}));j.displayName=`AlertDialogTitle`;const M=p(({className:t,...n},r)=>_(l,{ref:r,className:e(`text-body text-center text-sm font-normal sm:text-start`,t),...n}));M.displayName=`AlertDialogDescription`;const N=p(({appearance:e=`filled`,...t},n)=>{let i=S(),a=`default`;return i.priority===`danger`&&(a=`danger`),_(r,{appearance:e,priority:a,ref:n,...t})});N.displayName=`AlertDialogAction`;const P=p(({appearance:t=`outlined`,className:n,priority:i=`neutral`,...a},o)=>_(d,{asChild:!0,children:_(r,{appearance:t,className:e(`mt-2 sm:mt-0`,n),priority:i,ref:o,...a})}));P.displayName=`AlertDialogCancel`;const F=p(({className:n,svg:r,...i},a)=>{let o=S(),s=o.priority===`danger`?`text-danger-600`:`text-accent-600`,c=o.priority===`danger`?_(b,{}):_(y,{});return _(t,{ref:a,className:e(`size-12 sm:size-7`,s,n),svg:r??c,...i})});F.displayName=`AlertDialogIcon`;const I=d;I.displayName=`AlertDialogClose`;const L={Root:C,Action:N,Body:O,Cancel:P,Close:I,Content:D,Description:M,Footer:A,Header:k,Icon:F,Title:j,Trigger:w};export{L as AlertDialog};
|
|
2
2
|
//# sourceMappingURL=alert-dialog.js.map
|