@ngrok/mantle 0.79.3 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +158 -19
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +465 -32
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +116 -14
- package/dist/alert.js +1 -1
- package/dist/anchor-DfeXTpKW.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +504 -0
- package/dist/area-chart.js +1 -0
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +491 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +196 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
- package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
- package/dist/button-DjpEKt2X.js +1 -0
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +131 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +209 -8
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BROa2gqt.js +2 -0
- package/dist/chart-BcOC6Qj0.d.ts +275 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -11
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/choice-BNRQXszu.d.ts +254 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +242 -52
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +171 -16
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +279 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +28 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +67 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BM4wPCft.d.ts +24 -0
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +226 -35
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
- package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -22
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +568 -47
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +48 -7
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
- package/dist/icon-d-nMCfAI.js +1 -0
- package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +7 -15
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
- package/dist/input.d.ts +5 -56
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +490 -0
- package/dist/line-chart.js +1 -0
- package/dist/list-51KQvENW.js +1 -0
- package/dist/list.d.ts +135 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +18 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +282 -24
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +118 -6
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +61 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CE4OlWkd.d.ts +208 -0
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +101 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +110 -35
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/select-0z7HVS6r.d.ts +579 -0
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +225 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +285 -38
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +14 -14
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +10 -7
- package/dist/switch.js +1 -1
- package/dist/table-Bo0vNxIJ.d.ts +848 -0
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +124 -25
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/theme-switcher.d.ts +105 -33
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +54 -15
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +86 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +50 -5
- package/dist/tooltip.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +9 -3
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-vxLIvB8M.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-IKruV2iB.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D3MDng6U.js +0 -1
- package/dist/theme-provider-C9zpDyJW.js +0 -1
- package/dist/toast-BsCjaMVS.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as SvgAttributes } from "./
|
|
3
|
-
import { t as ButtonIntent } from "./
|
|
4
|
-
import { n as ButtonAppearance, r as ButtonProps } from "./button-
|
|
5
|
-
import {
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
|
|
3
|
+
import { t as ButtonIntent } from "./button-DdSKSj1c.js";
|
|
4
|
+
import { n as ButtonAppearance, r as ButtonProps } from "./button-DARFK2KJ.js";
|
|
5
|
+
import { a as Root$1, n as Content$1, o as Title$1, r as Description$1, s as Trigger$1, t as Close$1 } from "./dialog-BM4wPCft.js";
|
|
6
6
|
import { ComponentProps, ReactNode } from "react";
|
|
7
7
|
//#region src/components/alert-dialog/alert-dialog.d.ts
|
|
8
8
|
declare const intents: readonly ["info", "danger"];
|
|
@@ -57,6 +57,283 @@ type AlertDialogProps = ComponentProps<typeof Root$1> & {
|
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
59
|
declare function Root({ intent, ...props }: AlertDialogProps): import("react").JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* A button that opens the Alert Dialog.
|
|
62
|
+
*
|
|
63
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogtrigger
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <AlertDialog.Root intent="danger">
|
|
68
|
+
* <AlertDialog.Trigger asChild>
|
|
69
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
70
|
+
* Show Danger Alert Dialog
|
|
71
|
+
* </Button>
|
|
72
|
+
* </AlertDialog.Trigger>
|
|
73
|
+
* <AlertDialog.Content>
|
|
74
|
+
* <AlertDialog.Icon />
|
|
75
|
+
* <AlertDialog.Body>
|
|
76
|
+
* <AlertDialog.Header>
|
|
77
|
+
* <AlertDialog.Title>
|
|
78
|
+
* Are you absolutely sure?
|
|
79
|
+
* </AlertDialog.Title>
|
|
80
|
+
* <AlertDialog.Description>
|
|
81
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
82
|
+
* </AlertDialog.Description>
|
|
83
|
+
* </AlertDialog.Header>
|
|
84
|
+
* <AlertDialog.Footer>
|
|
85
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
86
|
+
* <AlertDialog.Action type="button">
|
|
87
|
+
* Continue
|
|
88
|
+
* </AlertDialog.Action>
|
|
89
|
+
* </AlertDialog.Footer>
|
|
90
|
+
* </AlertDialog.Body>
|
|
91
|
+
* </AlertDialog.Content>
|
|
92
|
+
* </AlertDialog.Root>
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
declare const Trigger: ({ ref, ...props }: ComponentProps<typeof Trigger$1>) => import("react").JSX.Element;
|
|
96
|
+
type AlertDialogContentProps = ComponentProps<typeof Content$1> & {
|
|
97
|
+
/**
|
|
98
|
+
* The preferred width of the `AlertDialogContent` as a tailwind `max-w-` class.
|
|
99
|
+
*
|
|
100
|
+
* By default, a `AlertDialog`'s content width is responsive with a default
|
|
101
|
+
* preferred width: the maximum width of the `AlertDialogContent`
|
|
102
|
+
*
|
|
103
|
+
* @default `max-w-md`
|
|
104
|
+
*/
|
|
105
|
+
preferredWidth?: `max-w-${string}`;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* The popover alert dialog container.
|
|
109
|
+
*
|
|
110
|
+
* Renders on top of the overlay and is centered in the viewport.
|
|
111
|
+
*
|
|
112
|
+
* `AlertDialog.Content` renders its floating layer at Tailwind `z-50`,
|
|
113
|
+
* Mantle's shared floating z-index. When multiple shared layers are open, the
|
|
114
|
+
* most recently mounted layer renders on top.
|
|
115
|
+
*
|
|
116
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogcontent
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* <AlertDialog.Root intent="danger">
|
|
121
|
+
* <AlertDialog.Trigger asChild>
|
|
122
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
123
|
+
* Show Danger Alert Dialog
|
|
124
|
+
* </Button>
|
|
125
|
+
* </AlertDialog.Trigger>
|
|
126
|
+
* <AlertDialog.Content>
|
|
127
|
+
* <AlertDialog.Icon />
|
|
128
|
+
* <AlertDialog.Body>
|
|
129
|
+
* <AlertDialog.Header>
|
|
130
|
+
* <AlertDialog.Title>
|
|
131
|
+
* Are you absolutely sure?
|
|
132
|
+
* </AlertDialog.Title>
|
|
133
|
+
* <AlertDialog.Description>
|
|
134
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
135
|
+
* </AlertDialog.Description>
|
|
136
|
+
* </AlertDialog.Header>
|
|
137
|
+
* <AlertDialog.Footer>
|
|
138
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
139
|
+
* <AlertDialog.Action type="button">
|
|
140
|
+
* Continue
|
|
141
|
+
* </AlertDialog.Action>
|
|
142
|
+
* </AlertDialog.Footer>
|
|
143
|
+
* </AlertDialog.Body>
|
|
144
|
+
* </AlertDialog.Content>
|
|
145
|
+
* </AlertDialog.Root>
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
declare const Content: ({ className, preferredWidth, ref, ...props }: AlertDialogContentProps) => import("react").JSX.Element;
|
|
149
|
+
/**
|
|
150
|
+
* Contains the main content of the alert dialog.
|
|
151
|
+
*
|
|
152
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogbody
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```tsx
|
|
156
|
+
* <AlertDialog.Root intent="danger">
|
|
157
|
+
* <AlertDialog.Trigger asChild>
|
|
158
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
159
|
+
* Show Danger Alert Dialog
|
|
160
|
+
* </Button>
|
|
161
|
+
* </AlertDialog.Trigger>
|
|
162
|
+
* <AlertDialog.Content>
|
|
163
|
+
* <AlertDialog.Icon />
|
|
164
|
+
* <AlertDialog.Body>
|
|
165
|
+
* <AlertDialog.Header>
|
|
166
|
+
* <AlertDialog.Title>
|
|
167
|
+
* Are you absolutely sure?
|
|
168
|
+
* </AlertDialog.Title>
|
|
169
|
+
* <AlertDialog.Description>
|
|
170
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
171
|
+
* </AlertDialog.Description>
|
|
172
|
+
* </AlertDialog.Header>
|
|
173
|
+
* <AlertDialog.Footer>
|
|
174
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
175
|
+
* <AlertDialog.Action type="button">
|
|
176
|
+
* Continue
|
|
177
|
+
* </AlertDialog.Action>
|
|
178
|
+
* </AlertDialog.Footer>
|
|
179
|
+
* </AlertDialog.Body>
|
|
180
|
+
* </AlertDialog.Content>
|
|
181
|
+
* </AlertDialog.Root>
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
declare const Body: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
|
|
185
|
+
/**
|
|
186
|
+
* Contains the header content of the dialog, including the title and description.
|
|
187
|
+
*
|
|
188
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogheader
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```tsx
|
|
192
|
+
* <AlertDialog.Root intent="danger">
|
|
193
|
+
* <AlertDialog.Trigger asChild>
|
|
194
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
195
|
+
* Show Danger Alert Dialog
|
|
196
|
+
* </Button>
|
|
197
|
+
* </AlertDialog.Trigger>
|
|
198
|
+
* <AlertDialog.Content>
|
|
199
|
+
* <AlertDialog.Icon />
|
|
200
|
+
* <AlertDialog.Body>
|
|
201
|
+
* <AlertDialog.Header>
|
|
202
|
+
* <AlertDialog.Title>
|
|
203
|
+
* Are you absolutely sure?
|
|
204
|
+
* </AlertDialog.Title>
|
|
205
|
+
* <AlertDialog.Description>
|
|
206
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
207
|
+
* </AlertDialog.Description>
|
|
208
|
+
* </AlertDialog.Header>
|
|
209
|
+
* <AlertDialog.Footer>
|
|
210
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
211
|
+
* <AlertDialog.Action type="button">
|
|
212
|
+
* Continue
|
|
213
|
+
* </AlertDialog.Action>
|
|
214
|
+
* </AlertDialog.Footer>
|
|
215
|
+
* </AlertDialog.Body>
|
|
216
|
+
* </AlertDialog.Content>
|
|
217
|
+
* </AlertDialog.Root>
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
declare const Header: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
|
|
221
|
+
/**
|
|
222
|
+
* Contains the footer content of the dialog, including the action and cancel buttons.
|
|
223
|
+
*
|
|
224
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogfooter
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```tsx
|
|
228
|
+
* <AlertDialog.Root intent="danger">
|
|
229
|
+
* <AlertDialog.Trigger asChild>
|
|
230
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
231
|
+
* Show Danger Alert Dialog
|
|
232
|
+
* </Button>
|
|
233
|
+
* </AlertDialog.Trigger>
|
|
234
|
+
* <AlertDialog.Content>
|
|
235
|
+
* <AlertDialog.Icon />
|
|
236
|
+
* <AlertDialog.Body>
|
|
237
|
+
* <AlertDialog.Header>
|
|
238
|
+
* <AlertDialog.Title>
|
|
239
|
+
* Are you absolutely sure?
|
|
240
|
+
* </AlertDialog.Title>
|
|
241
|
+
* <AlertDialog.Description>
|
|
242
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
243
|
+
* </AlertDialog.Description>
|
|
244
|
+
* </AlertDialog.Header>
|
|
245
|
+
* <AlertDialog.Footer>
|
|
246
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
247
|
+
* <AlertDialog.Action type="button">
|
|
248
|
+
* Continue
|
|
249
|
+
* </AlertDialog.Action>
|
|
250
|
+
* </AlertDialog.Footer>
|
|
251
|
+
* </AlertDialog.Body>
|
|
252
|
+
* </AlertDialog.Content>
|
|
253
|
+
* </AlertDialog.Root>
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
declare const Footer: ({ asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
|
|
257
|
+
/**
|
|
258
|
+
* An accessible name to be announced when the dialog is opened.
|
|
259
|
+
*
|
|
260
|
+
* Alternatively, you can provide `aria-label` or `aria-labelledby` to
|
|
261
|
+
* `AlertDialogContent` and exclude this component.
|
|
262
|
+
*
|
|
263
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogtitle
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```tsx
|
|
267
|
+
* <AlertDialog.Root intent="danger">
|
|
268
|
+
* <AlertDialog.Trigger asChild>
|
|
269
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
270
|
+
* Show Danger Alert Dialog
|
|
271
|
+
* </Button>
|
|
272
|
+
* </AlertDialog.Trigger>
|
|
273
|
+
* <AlertDialog.Content>
|
|
274
|
+
* <AlertDialog.Icon />
|
|
275
|
+
* <AlertDialog.Body>
|
|
276
|
+
* <AlertDialog.Header>
|
|
277
|
+
* <AlertDialog.Title>
|
|
278
|
+
* Are you absolutely sure?
|
|
279
|
+
* </AlertDialog.Title>
|
|
280
|
+
* <AlertDialog.Description>
|
|
281
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
282
|
+
* </AlertDialog.Description>
|
|
283
|
+
* </AlertDialog.Header>
|
|
284
|
+
* <AlertDialog.Footer>
|
|
285
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
286
|
+
* <AlertDialog.Action type="button">
|
|
287
|
+
* Continue
|
|
288
|
+
* </AlertDialog.Action>
|
|
289
|
+
* </AlertDialog.Footer>
|
|
290
|
+
* </AlertDialog.Body>
|
|
291
|
+
* </AlertDialog.Content>
|
|
292
|
+
* </AlertDialog.Root>
|
|
293
|
+
* ```
|
|
294
|
+
*/
|
|
295
|
+
declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$1>) => import("react").JSX.Element;
|
|
296
|
+
/**
|
|
297
|
+
* An accessible description to be announced when the dialog is opened.
|
|
298
|
+
* Renders as a `div` by default, but can be changed to any other element using
|
|
299
|
+
* the `asChild` prop.
|
|
300
|
+
*
|
|
301
|
+
* Alternatively, you can provide `aria-describedby` to `AlertDialogContent` and
|
|
302
|
+
* exclude this component.
|
|
303
|
+
*
|
|
304
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogdescription
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```tsx
|
|
308
|
+
* <AlertDialog.Root intent="danger">
|
|
309
|
+
* <AlertDialog.Trigger asChild>
|
|
310
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
311
|
+
* Show Danger Alert Dialog
|
|
312
|
+
* </Button>
|
|
313
|
+
* </AlertDialog.Trigger>
|
|
314
|
+
* <AlertDialog.Content>
|
|
315
|
+
* <AlertDialog.Icon />
|
|
316
|
+
* <AlertDialog.Body>
|
|
317
|
+
* <AlertDialog.Header>
|
|
318
|
+
* <AlertDialog.Title>
|
|
319
|
+
* Are you absolutely sure?
|
|
320
|
+
* </AlertDialog.Title>
|
|
321
|
+
* <AlertDialog.Description>
|
|
322
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
323
|
+
* </AlertDialog.Description>
|
|
324
|
+
* </AlertDialog.Header>
|
|
325
|
+
* <AlertDialog.Footer>
|
|
326
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
327
|
+
* <AlertDialog.Action type="button">
|
|
328
|
+
* Continue
|
|
329
|
+
* </AlertDialog.Action>
|
|
330
|
+
* </AlertDialog.Footer>
|
|
331
|
+
* </AlertDialog.Body>
|
|
332
|
+
* </AlertDialog.Content>
|
|
333
|
+
* </AlertDialog.Root>
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
declare const Description: ({ className, ref, ...props }: ComponentProps<typeof Description$1>) => import("react").JSX.Element;
|
|
60
337
|
type AlertDialogActionProps = Omit<ButtonProps, "appearance" | "intent"> & {
|
|
61
338
|
/**
|
|
62
339
|
* The visual style of the action button. Optional here — `AlertDialog.Action`
|
|
@@ -69,12 +346,54 @@ type AlertDialogActionProps = Omit<ButtonProps, "appearance" | "intent"> & {
|
|
|
69
346
|
/**
|
|
70
347
|
* The tone of the action button. Optional here — when omitted,
|
|
71
348
|
* `AlertDialog.Action` derives the tone from the parent `AlertDialog.Root`'s
|
|
72
|
-
* `intent` (`"danger"` → `"danger"`, `"info"` → `"
|
|
73
|
-
*
|
|
74
|
-
* always wins over the context-derived tone.
|
|
349
|
+
* `intent` (`"danger"` → `"danger"`, `"info"` → `"neutral"`). A passed
|
|
350
|
+
* value always wins over the context-derived tone.
|
|
75
351
|
*/
|
|
76
352
|
intent?: ButtonIntent;
|
|
77
353
|
};
|
|
354
|
+
/**
|
|
355
|
+
* A button that confirms the Alert Dialog action.
|
|
356
|
+
* Will default to appearance="filled", with a tone derived from the `AlertDialog`'s
|
|
357
|
+
* intent: danger dialogs get a danger button, info dialogs get a neutral one.
|
|
358
|
+
* Does not close the alert dialog by default.
|
|
359
|
+
*
|
|
360
|
+
* These buttons should be distinguished visually from the AlertDialogCancel button.
|
|
361
|
+
*
|
|
362
|
+
* Composes around the mantle Button component.
|
|
363
|
+
*
|
|
364
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogaction
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```tsx
|
|
368
|
+
* <AlertDialog.Root intent="danger">
|
|
369
|
+
* <AlertDialog.Trigger asChild>
|
|
370
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
371
|
+
* Show Danger Alert Dialog
|
|
372
|
+
* </Button>
|
|
373
|
+
* </AlertDialog.Trigger>
|
|
374
|
+
* <AlertDialog.Content>
|
|
375
|
+
* <AlertDialog.Icon />
|
|
376
|
+
* <AlertDialog.Body>
|
|
377
|
+
* <AlertDialog.Header>
|
|
378
|
+
* <AlertDialog.Title>
|
|
379
|
+
* Are you absolutely sure?
|
|
380
|
+
* </AlertDialog.Title>
|
|
381
|
+
* <AlertDialog.Description>
|
|
382
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
383
|
+
* </AlertDialog.Description>
|
|
384
|
+
* </AlertDialog.Header>
|
|
385
|
+
* <AlertDialog.Footer>
|
|
386
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
387
|
+
* <AlertDialog.Action type="button">
|
|
388
|
+
* Continue
|
|
389
|
+
* </AlertDialog.Action>
|
|
390
|
+
* </AlertDialog.Footer>
|
|
391
|
+
* </AlertDialog.Body>
|
|
392
|
+
* </AlertDialog.Content>
|
|
393
|
+
* </AlertDialog.Root>
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
declare const Action: ({ appearance, intent, ref, ...props }: AlertDialogActionProps) => import("react").JSX.Element;
|
|
78
397
|
type AlertDialogCancelProps = Omit<ButtonProps, "appearance" | "intent"> & {
|
|
79
398
|
/**
|
|
80
399
|
* The visual style of the cancel button. Optional here — `AlertDialog.Cancel`
|
|
@@ -92,9 +411,134 @@ type AlertDialogCancelProps = Omit<ButtonProps, "appearance" | "intent"> & {
|
|
|
92
411
|
*/
|
|
93
412
|
intent?: ButtonIntent;
|
|
94
413
|
};
|
|
414
|
+
/**
|
|
415
|
+
* A button that closes the dialog and cancels the action.
|
|
416
|
+
* Will default to appearance="outlined" and intent="neutral".
|
|
417
|
+
*
|
|
418
|
+
* This button should be distinguished visually from AlertDialogAction buttons.
|
|
419
|
+
*
|
|
420
|
+
* Composes around the mantle Button component.
|
|
421
|
+
*
|
|
422
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogcancel
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* ```tsx
|
|
426
|
+
* <AlertDialog.Root intent="danger">
|
|
427
|
+
* <AlertDialog.Trigger asChild>
|
|
428
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
429
|
+
* Show Danger Alert Dialog
|
|
430
|
+
* </Button>
|
|
431
|
+
* </AlertDialog.Trigger>
|
|
432
|
+
* <AlertDialog.Content>
|
|
433
|
+
* <AlertDialog.Icon />
|
|
434
|
+
* <AlertDialog.Body>
|
|
435
|
+
* <AlertDialog.Header>
|
|
436
|
+
* <AlertDialog.Title>
|
|
437
|
+
* Are you absolutely sure?
|
|
438
|
+
* </AlertDialog.Title>
|
|
439
|
+
* <AlertDialog.Description>
|
|
440
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
441
|
+
* </AlertDialog.Description>
|
|
442
|
+
* </AlertDialog.Header>
|
|
443
|
+
* <AlertDialog.Footer>
|
|
444
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
445
|
+
* <AlertDialog.Action type="button">
|
|
446
|
+
* Continue
|
|
447
|
+
* </AlertDialog.Action>
|
|
448
|
+
* </AlertDialog.Footer>
|
|
449
|
+
* </AlertDialog.Body>
|
|
450
|
+
* </AlertDialog.Content>
|
|
451
|
+
* </AlertDialog.Root>
|
|
452
|
+
* ```
|
|
453
|
+
*/
|
|
454
|
+
declare const Cancel: ({ appearance, className, intent, ref, ...props }: AlertDialogCancelProps) => import("react").JSX.Element;
|
|
95
455
|
type AlertDialogIconProps = Omit<SvgAttributes, "children"> & {
|
|
96
456
|
svg?: ReactNode;
|
|
97
457
|
};
|
|
458
|
+
/**
|
|
459
|
+
* An icon that visually represents the intent of the AlertDialog.
|
|
460
|
+
*
|
|
461
|
+
* Defaults to a warning icon for danger intent and an info icon for info
|
|
462
|
+
* intent with the appropriate color.
|
|
463
|
+
*
|
|
464
|
+
* Can be overridden with a custom icon using the `svg` prop.
|
|
465
|
+
*
|
|
466
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogicon
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```tsx
|
|
470
|
+
* <AlertDialog.Root intent="danger">
|
|
471
|
+
* <AlertDialog.Trigger asChild>
|
|
472
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
473
|
+
* Show Danger Alert Dialog
|
|
474
|
+
* </Button>
|
|
475
|
+
* </AlertDialog.Trigger>
|
|
476
|
+
* <AlertDialog.Content>
|
|
477
|
+
* <AlertDialog.Icon />
|
|
478
|
+
* <AlertDialog.Body>
|
|
479
|
+
* <AlertDialog.Header>
|
|
480
|
+
* <AlertDialog.Title>
|
|
481
|
+
* Are you absolutely sure?
|
|
482
|
+
* </AlertDialog.Title>
|
|
483
|
+
* <AlertDialog.Description>
|
|
484
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
485
|
+
* </AlertDialog.Description>
|
|
486
|
+
* </AlertDialog.Header>
|
|
487
|
+
* <AlertDialog.Footer>
|
|
488
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
489
|
+
* <AlertDialog.Action type="button">
|
|
490
|
+
* Continue
|
|
491
|
+
* </AlertDialog.Action>
|
|
492
|
+
* </AlertDialog.Footer>
|
|
493
|
+
* </AlertDialog.Body>
|
|
494
|
+
* </AlertDialog.Content>
|
|
495
|
+
* </AlertDialog.Root>
|
|
496
|
+
* ```
|
|
497
|
+
*/
|
|
498
|
+
declare const Icon: ({ className, ref, svg, ...props }: AlertDialogIconProps) => import("react").JSX.Element;
|
|
499
|
+
/**
|
|
500
|
+
* A button that closes the Alert Dialog. (Unstyled)
|
|
501
|
+
*
|
|
502
|
+
* `AlertDialog.Cancel` already closes the dialog by default. Reach for
|
|
503
|
+
* `AlertDialog.Close` when you need to attach close behavior to a custom
|
|
504
|
+
* element (typically wrapping `AlertDialog.Action` with `asChild` so the
|
|
505
|
+
* action both performs the operation and dismisses the dialog).
|
|
506
|
+
*
|
|
507
|
+
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogclose
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* ```tsx
|
|
511
|
+
* <AlertDialog.Root intent="danger">
|
|
512
|
+
* <AlertDialog.Trigger asChild>
|
|
513
|
+
* <Button type="button" appearance="outlined" intent="neutral">
|
|
514
|
+
* Show Danger Alert Dialog
|
|
515
|
+
* </Button>
|
|
516
|
+
* </AlertDialog.Trigger>
|
|
517
|
+
* <AlertDialog.Content>
|
|
518
|
+
* <AlertDialog.Icon />
|
|
519
|
+
* <AlertDialog.Body>
|
|
520
|
+
* <AlertDialog.Header>
|
|
521
|
+
* <AlertDialog.Title>
|
|
522
|
+
* Are you absolutely sure?
|
|
523
|
+
* </AlertDialog.Title>
|
|
524
|
+
* <AlertDialog.Description>
|
|
525
|
+
* Proident quis nisi tempor irure sunt ut minim occaecat mollit sunt.
|
|
526
|
+
* </AlertDialog.Description>
|
|
527
|
+
* </AlertDialog.Header>
|
|
528
|
+
* <AlertDialog.Footer>
|
|
529
|
+
* <AlertDialog.Cancel type="button">Cancel</AlertDialog.Cancel>
|
|
530
|
+
* <AlertDialog.Close asChild>
|
|
531
|
+
* <AlertDialog.Action type="button" onClick={() => doThing()}>
|
|
532
|
+
* Do thing and close
|
|
533
|
+
* </AlertDialog.Action>
|
|
534
|
+
* </AlertDialog.Close>
|
|
535
|
+
* </AlertDialog.Footer>
|
|
536
|
+
* </AlertDialog.Body>
|
|
537
|
+
* </AlertDialog.Content>
|
|
538
|
+
* </AlertDialog.Root>
|
|
539
|
+
* ```
|
|
540
|
+
*/
|
|
541
|
+
declare const Close: ({ ref, ...props }: ComponentProps<typeof Close$1>) => import("react").JSX.Element;
|
|
98
542
|
/**
|
|
99
543
|
* A modal dialog that interrupts the user with important content and expects a
|
|
100
544
|
* response. Use AlertDialog for destructive or irreversible confirmations
|
|
@@ -205,9 +649,8 @@ declare const AlertDialog: {
|
|
|
205
649
|
* A button that confirms the Alert Dialog action. Defaults to
|
|
206
650
|
* `appearance="filled"`, with a tone derived from the parent
|
|
207
651
|
* `AlertDialog.Root`'s intent: danger dialogs get a danger button, info
|
|
208
|
-
* dialogs get
|
|
209
|
-
*
|
|
210
|
-
* with `AlertDialog.Close asChild` if the action should also dismiss.
|
|
652
|
+
* dialogs get a neutral one. Does not close the dialog by default — wrap with
|
|
653
|
+
* `AlertDialog.Close asChild` if the action should also dismiss.
|
|
211
654
|
*
|
|
212
655
|
* @see https://mantle.ngrok.com/components/overlays/alert-dialog#alertdialogaction
|
|
213
656
|
*
|
|
@@ -241,7 +684,7 @@ declare const AlertDialog: {
|
|
|
241
684
|
* </AlertDialog.Root>
|
|
242
685
|
* ```
|
|
243
686
|
*/
|
|
244
|
-
readonly Action:
|
|
687
|
+
readonly Action: typeof Action;
|
|
245
688
|
/**
|
|
246
689
|
* Contains the main content of the alert dialog. Wraps the header and footer
|
|
247
690
|
* inside `AlertDialog.Content` next to `AlertDialog.Icon`.
|
|
@@ -278,7 +721,7 @@ declare const AlertDialog: {
|
|
|
278
721
|
* </AlertDialog.Root>
|
|
279
722
|
* ```
|
|
280
723
|
*/
|
|
281
|
-
readonly Body:
|
|
724
|
+
readonly Body: typeof Body;
|
|
282
725
|
/**
|
|
283
726
|
* A button that closes the dialog and cancels the action. Defaults to
|
|
284
727
|
* `appearance="outlined"` and `intent="neutral"` so it visually
|
|
@@ -316,7 +759,7 @@ declare const AlertDialog: {
|
|
|
316
759
|
* </AlertDialog.Root>
|
|
317
760
|
* ```
|
|
318
761
|
*/
|
|
319
|
-
readonly Cancel:
|
|
762
|
+
readonly Cancel: typeof Cancel;
|
|
320
763
|
/**
|
|
321
764
|
* A button that closes the Alert Dialog. (Unstyled) Typically wrapped
|
|
322
765
|
* around `AlertDialog.Action` with `asChild` so the action both performs
|
|
@@ -356,7 +799,7 @@ declare const AlertDialog: {
|
|
|
356
799
|
* </AlertDialog.Root>
|
|
357
800
|
* ```
|
|
358
801
|
*/
|
|
359
|
-
readonly Close:
|
|
802
|
+
readonly Close: typeof Close;
|
|
360
803
|
/**
|
|
361
804
|
* The popover alert dialog container. Renders on top of the overlay,
|
|
362
805
|
* centered in the viewport.
|
|
@@ -397,17 +840,7 @@ declare const AlertDialog: {
|
|
|
397
840
|
* </AlertDialog.Root>
|
|
398
841
|
* ```
|
|
399
842
|
*/
|
|
400
|
-
readonly Content:
|
|
401
|
-
/**
|
|
402
|
-
* The preferred width of the `AlertDialogContent` as a tailwind `max-w-` class.
|
|
403
|
-
*
|
|
404
|
-
* By default, a `AlertDialog`'s content width is responsive with a default
|
|
405
|
-
* preferred width: the maximum width of the `AlertDialogContent`
|
|
406
|
-
*
|
|
407
|
-
* @default `max-w-md`
|
|
408
|
-
*/
|
|
409
|
-
preferredWidth?: `max-w-${string}`;
|
|
410
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
843
|
+
readonly Content: typeof Content;
|
|
411
844
|
/**
|
|
412
845
|
* An accessible description to be announced when the dialog is opened.
|
|
413
846
|
* Renders as a `div` by default; can be changed via the `asChild` prop.
|
|
@@ -444,7 +877,7 @@ declare const AlertDialog: {
|
|
|
444
877
|
* </AlertDialog.Root>
|
|
445
878
|
* ```
|
|
446
879
|
*/
|
|
447
|
-
readonly Description:
|
|
880
|
+
readonly Description: typeof Description;
|
|
448
881
|
/**
|
|
449
882
|
* Contains the footer content of the dialog, including the action and
|
|
450
883
|
* cancel buttons.
|
|
@@ -481,7 +914,7 @@ declare const AlertDialog: {
|
|
|
481
914
|
* </AlertDialog.Root>
|
|
482
915
|
* ```
|
|
483
916
|
*/
|
|
484
|
-
readonly Footer:
|
|
917
|
+
readonly Footer: typeof Footer;
|
|
485
918
|
/**
|
|
486
919
|
* Contains the header content of the dialog, including the title and
|
|
487
920
|
* description.
|
|
@@ -518,7 +951,7 @@ declare const AlertDialog: {
|
|
|
518
951
|
* </AlertDialog.Root>
|
|
519
952
|
* ```
|
|
520
953
|
*/
|
|
521
|
-
readonly Header:
|
|
954
|
+
readonly Header: typeof Header;
|
|
522
955
|
/**
|
|
523
956
|
* An icon that visually represents the intent of the AlertDialog.
|
|
524
957
|
* Defaults to a warning icon for `danger` and an info icon for `info`. Can
|
|
@@ -556,7 +989,7 @@ declare const AlertDialog: {
|
|
|
556
989
|
* </AlertDialog.Root>
|
|
557
990
|
* ```
|
|
558
991
|
*/
|
|
559
|
-
readonly Icon:
|
|
992
|
+
readonly Icon: typeof Icon;
|
|
560
993
|
/**
|
|
561
994
|
* An accessible name to be announced when the dialog is opened.
|
|
562
995
|
* Alternatively, provide `aria-label` or `aria-labelledby` to
|
|
@@ -594,7 +1027,7 @@ declare const AlertDialog: {
|
|
|
594
1027
|
* </AlertDialog.Root>
|
|
595
1028
|
* ```
|
|
596
1029
|
*/
|
|
597
|
-
readonly Title:
|
|
1030
|
+
readonly Title: typeof Title;
|
|
598
1031
|
/**
|
|
599
1032
|
* A button that opens the Alert Dialog.
|
|
600
1033
|
*
|
|
@@ -630,7 +1063,7 @@ declare const AlertDialog: {
|
|
|
630
1063
|
* </AlertDialog.Root>
|
|
631
1064
|
* ```
|
|
632
1065
|
*/
|
|
633
|
-
readonly Trigger:
|
|
1066
|
+
readonly Trigger: typeof Trigger;
|
|
634
1067
|
};
|
|
635
1068
|
//#endregion
|
|
636
1069
|
export { AlertDialog };
|
package/dist/alert-dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./button-DjpEKt2X.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-trJDqIXJ.js";import{createContext as f,useContext as p,useMemo as m}from"react";import h from"tiny-invariant";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{InfoIcon as v}from"@phosphor-icons/react/Info";import{WarningIcon as y}from"@phosphor-icons/react/Warning";const b=f(null);function x(){let e=p(b);return h(e,`AlertDialog child component used outside of AlertDialog parent!`),e}function S({intent:e,...t}){let n=m(()=>({intent:e}),[e]);return g(b.Provider,{value:n,children:g(c,{...t})})}const C=({ref:e,...t})=>g(a,{ref:e,"data-slot":`alert-dialog-trigger`,...t}),w=i,T=({className:t,ref:n,...r})=>g(o,{"data-slot":`alert-dialog-overlay`,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),...r,ref:n}),E=({className:t,preferredWidth:n=`max-w-md`,ref:r,...i})=>_(w,{children:[g(T,{}),g(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:g(s,{"data-slot":`alert-dialog-content`,"data-mantle-modal-content":!0,ref:r,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),...i})})]}),D=({asChild:t=!1,className:r,ref:i,...a})=>g(t?n:`div`,{"data-slot":`alert-dialog-body`,className:e(`flex-1 space-y-4`,r),ref:i,...a}),O=({asChild:t=!1,className:r,ref:i,...a})=>g(t?n:`div`,{"data-slot":`alert-dialog-header`,className:e(`flex flex-col space-y-2 text-center sm:text-start`,r),ref:i,...a}),k=({asChild:t=!1,className:r,ref:i,...a})=>g(t?n:`div`,{"data-slot":`alert-dialog-footer`,className:e(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,r),ref:i,...a}),A=({className:t,ref:n,...r})=>g(u,{ref:n,"data-slot":`alert-dialog-title`,className:e(`text-strong text-center text-lg font-medium sm:text-start`,t),...r}),j=({className:t,ref:n,...r})=>g(l,{ref:n,"data-slot":`alert-dialog-description`,className:e(`text-body text-center text-sm font-normal sm:text-start`,t),...r}),M={danger:`danger`,info:`neutral`},N=({appearance:e=`filled`,intent:t,ref:n,...i})=>{let a=x(),o=M[a.intent];return g(r,{appearance:e,"data-slot":`alert-dialog-action`,intent:t??o,ref:n,...i})},P=({appearance:t=`outlined`,className:n,intent:i=`neutral`,ref:a,...o})=>g(d,{asChild:!0,children:g(r,{appearance:t,"data-slot":`alert-dialog-cancel`,className:e(`mt-2 sm:mt-0`,n),intent:i,ref:a,...o})}),F={danger:g(y,{}),info:g(v,{})},I={danger:`text-danger-600`,info:`text-accent-600`},L={Root:S,Action:N,Body:D,Cancel:P,Close:({ref:e,...t})=>g(d,{ref:e,"data-slot":`alert-dialog-close`,...t}),Content:E,Description:j,Footer:k,Header:O,Icon:({className:n,ref:r,svg:i,...a})=>{let o=x(),s=I[o.intent],c=F[o.intent];return g(t,{ref:r,"data-slot":`alert-dialog-icon`,className:e(`size-12 sm:size-7`,s,n),svg:i??c,...a})},Title:A,Trigger:C};export{L as AlertDialog};
|