@tamagui/alert-dialog 2.7.7 → 3.0.0-beta.1091.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/cjs/AlertDialog.cjs +178 -234
- package/dist/cjs/AlertDialog.native.cjs +234 -0
- package/dist/cjs/AlertDialog.native.js +182 -324
- package/dist/cjs/AlertDialog.native.js.map +1 -1
- package/dist/cjs/alertDialogPart.cjs +30 -0
- package/dist/cjs/alertDialogPart.native.cjs +32 -0
- package/dist/cjs/alertDialogPart.native.js +34 -0
- package/dist/cjs/alertDialogPart.native.js.map +1 -0
- package/dist/cjs/index.cjs +9 -11
- package/dist/cjs/index.native.cjs +20 -0
- package/dist/cjs/index.native.js +9 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useNativeAlertDialog.cjs +24 -0
- package/dist/cjs/useNativeAlertDialog.native.cjs +139 -0
- package/dist/cjs/useNativeAlertDialog.native.js +141 -0
- package/dist/cjs/useNativeAlertDialog.native.js.map +1 -0
- package/dist/esm/AlertDialog.mjs +153 -187
- package/dist/esm/AlertDialog.mjs.map +1 -1
- package/dist/esm/AlertDialog.native.js +158 -292
- package/dist/esm/AlertDialog.native.js.map +1 -1
- package/dist/esm/alertDialogPart.mjs +7 -0
- package/dist/esm/alertDialogPart.mjs.map +1 -0
- package/dist/esm/alertDialogPart.native.js +7 -0
- package/dist/esm/alertDialogPart.native.js.map +1 -0
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/esm/useNativeAlertDialog.mjs +4 -0
- package/dist/esm/useNativeAlertDialog.mjs.map +1 -0
- package/dist/esm/useNativeAlertDialog.native.js +112 -0
- package/dist/esm/useNativeAlertDialog.native.js.map +1 -0
- package/dist/jsx/AlertDialog.mjs +153 -187
- package/dist/jsx/AlertDialog.mjs.map +1 -1
- package/dist/jsx/AlertDialog.native.cjs +234 -0
- package/dist/jsx/AlertDialog.native.js +182 -324
- package/dist/jsx/AlertDialog.native.js.map +1 -1
- package/dist/jsx/alertDialogPart.mjs +7 -0
- package/dist/jsx/alertDialogPart.mjs.map +1 -0
- package/dist/jsx/alertDialogPart.native.cjs +32 -0
- package/dist/jsx/alertDialogPart.native.js +34 -0
- package/dist/jsx/alertDialogPart.native.js.map +1 -0
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +20 -0
- package/dist/jsx/index.native.js +9 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/useNativeAlertDialog.mjs +4 -0
- package/dist/jsx/useNativeAlertDialog.mjs.map +1 -0
- package/dist/jsx/useNativeAlertDialog.native.cjs +139 -0
- package/dist/jsx/useNativeAlertDialog.native.js +141 -0
- package/dist/jsx/useNativeAlertDialog.native.js.map +1 -0
- package/package.json +22 -20
- package/src/AlertDialog.tsx +80 -181
- package/src/alertDialogPart.ts +26 -0
- package/src/useNativeAlertDialog.native.tsx +129 -0
- package/src/useNativeAlertDialog.ts +11 -0
- package/types/AlertDialog.d.ts +28 -62
- package/types/AlertDialog.d.ts.map +1 -1
- package/types/alertDialogPart.d.ts +15 -0
- package/types/alertDialogPart.d.ts.map +1 -0
- package/types/useNativeAlertDialog.d.ts +11 -0
- package/types/useNativeAlertDialog.d.ts.map +1 -0
- package/types/useNativeAlertDialog.native.d.ts +11 -0
- package/types/useNativeAlertDialog.native.d.ts.map +1 -0
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -7,372 +7,230 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
14
|
};
|
|
15
15
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
23
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
32
27
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
29
|
var AlertDialog_exports = {};
|
|
37
30
|
__export(AlertDialog_exports, {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
AlertDialog: () => AlertDialog,
|
|
32
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
33
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
34
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
35
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
36
|
+
AlertDialogDestructive: () => AlertDialogDestructive,
|
|
37
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
38
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
39
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
40
|
+
AlertDialogTrigger: () => AlertDialogTrigger
|
|
48
41
|
});
|
|
49
42
|
module.exports = __toCommonJS(AlertDialog_exports);
|
|
50
43
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var import_core = require("@tamagui/core");
|
|
51
45
|
var import_compose_refs = require("@tamagui/compose-refs");
|
|
52
46
|
var import_constants = require("@tamagui/constants");
|
|
53
|
-
var
|
|
47
|
+
var import_core2 = require("@tamagui/core");
|
|
54
48
|
var import_dialog = require("@tamagui/dialog");
|
|
55
49
|
var import_helpers = require("@tamagui/helpers");
|
|
56
|
-
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
57
50
|
var React = __toESM(require("react"), 1);
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
|
|
51
|
+
var import_alertDialogPart = require("./alertDialogPart.native.js");
|
|
52
|
+
var import_useNativeAlertDialog = require("./useNativeAlertDialog.native.js");
|
|
53
|
+
var getAlertDialogScope = function(scope) {
|
|
54
|
+
return scope;
|
|
61
55
|
};
|
|
62
56
|
var ROOT_NAME = "AlertDialog";
|
|
63
57
|
var TRIGGER_NAME = "AlertDialogTrigger";
|
|
64
|
-
var NativeAlertDialogTriggerFrame = (0,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var {
|
|
81
|
-
scope,
|
|
82
|
-
...triggerProps
|
|
83
|
-
} = props;
|
|
84
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_dialog.DialogTrigger, {
|
|
85
|
-
scope: getAlertDialogScope(scope),
|
|
86
|
-
...triggerProps,
|
|
87
|
-
ref: forwardedRef
|
|
88
|
-
});
|
|
58
|
+
var NativeAlertDialogTriggerFrame = (0, import_core2.styled)(import_core2.View, { displayName: TRIGGER_NAME });
|
|
59
|
+
(0, import_alertDialogPart.markAlertDialogPart)(NativeAlertDialogTriggerFrame, "trigger");
|
|
60
|
+
var AlertDialogTrigger = (0, import_core.createStyledHOC)(NativeAlertDialogTriggerFrame, function AlertDialogTrigger2(props, forwardedRef) {
|
|
61
|
+
if (props["__native"]) {
|
|
62
|
+
var { __native, onPress, __onPress, ...rest } = props;
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeAlertDialogTriggerFrame, {
|
|
64
|
+
...rest,
|
|
65
|
+
onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
var { scope, ...triggerProps } = props;
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTrigger, {
|
|
70
|
+
scope: getAlertDialogScope(scope),
|
|
71
|
+
...triggerProps,
|
|
72
|
+
ref: forwardedRef
|
|
73
|
+
});
|
|
89
74
|
});
|
|
90
75
|
var AlertDialogPortal = function AlertDialogPortal2(props) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
scope: getAlertDialogScope(scope),
|
|
97
|
-
...portalProps
|
|
98
|
-
});
|
|
76
|
+
var { scope, ...portalProps } = props;
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogPortal, {
|
|
78
|
+
scope: getAlertDialogScope(scope),
|
|
79
|
+
...portalProps
|
|
80
|
+
});
|
|
99
81
|
};
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
...overlayProps,
|
|
110
|
-
ref: forwardedRef
|
|
111
|
-
});
|
|
82
|
+
var OVERLAY_NAME = "AlertDialogOverlay";
|
|
83
|
+
var AlertDialogOverlayFrame = (0, import_core2.styled)(import_dialog.DialogOverlayFrame, { displayName: OVERLAY_NAME });
|
|
84
|
+
var AlertDialogOverlay = (0, import_core.createStyledHOC)(AlertDialogOverlayFrame, function AlertDialogOverlay2(props, forwardedRef) {
|
|
85
|
+
var { scope, ...overlayProps } = props;
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogOverlay, {
|
|
87
|
+
scope: getAlertDialogScope(scope),
|
|
88
|
+
...overlayProps,
|
|
89
|
+
ref: forwardedRef
|
|
90
|
+
});
|
|
112
91
|
});
|
|
113
92
|
var CONTENT_NAME = "AlertDialogContent";
|
|
114
|
-
var {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var
|
|
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
|
-
return event.preventDefault();
|
|
154
|
-
},
|
|
155
|
-
onInteractOutside: function (event) {
|
|
156
|
-
return event.preventDefault();
|
|
157
|
-
},
|
|
158
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.Slottable, {
|
|
159
|
-
children
|
|
160
|
-
}), process.env.NODE_ENV === "development" && /* @__PURE__ */(0, import_jsx_runtime.jsx)(DescriptionWarning, {
|
|
161
|
-
contentRef
|
|
162
|
-
})]
|
|
163
|
-
})
|
|
164
|
-
})
|
|
165
|
-
});
|
|
93
|
+
var { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core2.createStyledContext)({}, "AlertDialogContext");
|
|
94
|
+
var AlertDialogContent = (0, import_core.createRefComponent)(function AlertDialogContent2(props, forwardedRef) {
|
|
95
|
+
var { scope, children, ...contentProps } = props;
|
|
96
|
+
var dialogScope = getAlertDialogScope(scope);
|
|
97
|
+
var contentRef = React.useRef(null);
|
|
98
|
+
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
|
99
|
+
var cancelRef = React.useRef(null);
|
|
100
|
+
var destructiveRef = React.useRef(null);
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogWarningProvider, {
|
|
102
|
+
contentName: CONTENT_NAME,
|
|
103
|
+
titleName: TITLE_NAME,
|
|
104
|
+
docsSlug: "alert-dialog",
|
|
105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContextProvider, {
|
|
106
|
+
scope,
|
|
107
|
+
cancelRef,
|
|
108
|
+
destructiveRef,
|
|
109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogContent, {
|
|
110
|
+
role: "alertdialog",
|
|
111
|
+
"aria-modal": true,
|
|
112
|
+
scope: dialogScope,
|
|
113
|
+
...contentProps,
|
|
114
|
+
ref: composedRefs,
|
|
115
|
+
onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {
|
|
116
|
+
event.cancel();
|
|
117
|
+
if (import_constants.isWeb) {
|
|
118
|
+
var _cancelRef_current;
|
|
119
|
+
(_cancelRef_current = cancelRef.current) === null || _cancelRef_current === void 0 ? void 0 : _cancelRef_current.focus({ preventScroll: true });
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
onPointerDownOutside: function(event) {
|
|
123
|
+
return event.cancel();
|
|
124
|
+
},
|
|
125
|
+
onInteractOutside: function(event) {
|
|
126
|
+
return event.cancel();
|
|
127
|
+
},
|
|
128
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slottable, { children }), process.env.NODE_ENV === "development" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })]
|
|
129
|
+
})
|
|
130
|
+
})
|
|
131
|
+
});
|
|
166
132
|
});
|
|
167
133
|
var TITLE_NAME = "AlertDialogTitle";
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
...titleProps,
|
|
178
|
-
ref: forwardedRef
|
|
179
|
-
});
|
|
134
|
+
var AlertDialogTitleFrame = (0, import_core2.styled)(import_core2.View, { displayName: TITLE_NAME });
|
|
135
|
+
(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogTitleFrame, "title");
|
|
136
|
+
var AlertDialogTitle = (0, import_core.createStyledHOC)(AlertDialogTitleFrame, function AlertDialogTitle2(props, forwardedRef) {
|
|
137
|
+
var { scope, ...titleProps } = props;
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, {
|
|
139
|
+
scope: getAlertDialogScope(scope),
|
|
140
|
+
...titleProps,
|
|
141
|
+
ref: forwardedRef
|
|
142
|
+
});
|
|
180
143
|
});
|
|
181
144
|
var DESCRIPTION_NAME = "AlertDialogDescription";
|
|
182
|
-
var
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
...descriptionProps,
|
|
192
|
-
ref: forwardedRef
|
|
193
|
-
});
|
|
145
|
+
var AlertDialogDescriptionFrame = (0, import_core2.styled)(import_core2.View, { displayName: DESCRIPTION_NAME });
|
|
146
|
+
(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogDescriptionFrame, "description");
|
|
147
|
+
var AlertDialogDescription = (0, import_core.createStyledHOC)(AlertDialogDescriptionFrame, function AlertDialogDescription2(props, forwardedRef) {
|
|
148
|
+
var { scope, ...descriptionProps } = props;
|
|
149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, {
|
|
150
|
+
scope: getAlertDialogScope(scope),
|
|
151
|
+
...descriptionProps,
|
|
152
|
+
ref: forwardedRef
|
|
153
|
+
});
|
|
194
154
|
});
|
|
195
155
|
var ACTION_NAME = "AlertDialogAction";
|
|
196
|
-
var
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
...actionProps,
|
|
206
|
-
ref: forwardedRef
|
|
207
|
-
});
|
|
156
|
+
var AlertDialogActionFrame = (0, import_core2.styled)(import_core2.View, { displayName: ACTION_NAME });
|
|
157
|
+
(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogActionFrame, "action");
|
|
158
|
+
var AlertDialogAction = (0, import_core.createStyledHOC)(AlertDialogActionFrame, function AlertDialogAction2(props, forwardedRef) {
|
|
159
|
+
var { scope, ...actionProps } = props;
|
|
160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {
|
|
161
|
+
scope: getAlertDialogScope(scope),
|
|
162
|
+
...actionProps,
|
|
163
|
+
ref: forwardedRef
|
|
164
|
+
});
|
|
208
165
|
});
|
|
209
166
|
var CANCEL_NAME = "AlertDialogCancel";
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {
|
|
222
|
-
scope: getAlertDialogScope(scope),
|
|
223
|
-
...cancelProps,
|
|
224
|
-
ref
|
|
225
|
-
});
|
|
167
|
+
var AlertDialogCancelFrame = (0, import_core2.styled)(import_core2.View, { displayName: CANCEL_NAME });
|
|
168
|
+
(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogCancelFrame, "cancel");
|
|
169
|
+
var AlertDialogCancel = (0, import_core.createStyledHOC)(AlertDialogCancelFrame, function AlertDialogCancel2(props, forwardedRef) {
|
|
170
|
+
var { scope, ...cancelProps } = props;
|
|
171
|
+
var { cancelRef } = useAlertDialogContentContext(scope);
|
|
172
|
+
var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {
|
|
174
|
+
scope: getAlertDialogScope(scope),
|
|
175
|
+
...cancelProps,
|
|
176
|
+
ref
|
|
177
|
+
});
|
|
226
178
|
});
|
|
227
179
|
var DESTRUCTIVE_NAME = "AlertDialogDestructive";
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {
|
|
240
|
-
scope: getAlertDialogScope(scope),
|
|
241
|
-
...destructiveProps,
|
|
242
|
-
ref
|
|
243
|
-
});
|
|
180
|
+
var AlertDialogDestructiveFrame = (0, import_core2.styled)(import_core2.View, { displayName: DESTRUCTIVE_NAME });
|
|
181
|
+
(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogDestructiveFrame, "destructive");
|
|
182
|
+
var AlertDialogDestructive = (0, import_core.createStyledHOC)(AlertDialogDestructiveFrame, function AlertDialogDestructive2(props, forwardedRef) {
|
|
183
|
+
var { scope, ...destructiveProps } = props;
|
|
184
|
+
var { destructiveRef } = useAlertDialogContentContext(scope);
|
|
185
|
+
var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, destructiveRef);
|
|
186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {
|
|
187
|
+
scope: getAlertDialogScope(scope),
|
|
188
|
+
...destructiveProps,
|
|
189
|
+
ref
|
|
190
|
+
});
|
|
244
191
|
});
|
|
245
|
-
var DescriptionWarning = function
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
192
|
+
var DescriptionWarning = function(param) {
|
|
193
|
+
var { contentRef } = param;
|
|
194
|
+
if (process.env.NODE_ENV === "development") {
|
|
195
|
+
React.useEffect(function() {
|
|
196
|
+
var _contentRef_current;
|
|
197
|
+
if (!import_constants.isWeb) return;
|
|
198
|
+
var hasDescription = document.getElementById((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.getAttribute("aria-describedby"));
|
|
199
|
+
if (!hasDescription) {
|
|
200
|
+
console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
253
201
|
|
|
254
202
|
You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
255
203
|
|
|
256
204
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
257
205
|
|
|
258
206
|
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
259
|
-
|
|
260
|
-
|
|
207
|
+
}
|
|
208
|
+
}, [contentRef]);
|
|
209
|
+
}
|
|
210
|
+
return null;
|
|
261
211
|
};
|
|
262
|
-
var AlertDialogInner = function
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
onChange: props.onOpenChange,
|
|
273
|
-
transition: true
|
|
274
|
-
});
|
|
275
|
-
var triggerElement = null;
|
|
276
|
-
var title = "";
|
|
277
|
-
var description = "";
|
|
278
|
-
var buttons = [];
|
|
279
|
-
forEachChildDeep(React.Children.toArray(props.children), function (child) {
|
|
280
|
-
if (! /* @__PURE__ */React.isValidElement(child)) return false;
|
|
281
|
-
var name = (0, import_core.isTamaguiElement)(child) ? child.type.staticConfig.componentName : child.type["displayName"];
|
|
282
|
-
switch (name) {
|
|
283
|
-
case TRIGGER_NAME:
|
|
284
|
-
triggerElement = /* @__PURE__ */React.cloneElement(child, {
|
|
285
|
-
__native: true
|
|
286
|
-
});
|
|
287
|
-
return false;
|
|
288
|
-
case TITLE_NAME:
|
|
289
|
-
title = getStringChildren(child);
|
|
290
|
-
return false;
|
|
291
|
-
case DESCRIPTION_NAME:
|
|
292
|
-
description = getStringChildren(child);
|
|
293
|
-
return false;
|
|
294
|
-
case ACTION_NAME:
|
|
295
|
-
case DESTRUCTIVE_NAME:
|
|
296
|
-
case CANCEL_NAME:
|
|
297
|
-
var style = name === ACTION_NAME ? "default" : name === DESTRUCTIVE_NAME ? "destructive" : "cancel";
|
|
298
|
-
var text = getStringChildren(child);
|
|
299
|
-
var onPress = function () {
|
|
300
|
-
var _childProps_onPress;
|
|
301
|
-
var childProps = child.props;
|
|
302
|
-
childProps === null || childProps === void 0 || (_childProps_onPress = childProps.onPress) == null || _childProps_onPress.call(childProps, {
|
|
303
|
-
native: true
|
|
304
|
-
});
|
|
305
|
-
setOpen(false);
|
|
306
|
-
};
|
|
307
|
-
buttons.push({
|
|
308
|
-
style,
|
|
309
|
-
text,
|
|
310
|
-
onPress
|
|
311
|
-
});
|
|
312
|
-
return false;
|
|
313
|
-
default:
|
|
314
|
-
return true;
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
(0, import_constants.useIsomorphicLayoutEffect)(function () {
|
|
318
|
-
if (!open || !native) return;
|
|
319
|
-
if (title || description) import_react_native.Alert.alert(title, description, buttons);
|
|
320
|
-
}, [native, open]);
|
|
321
|
-
if (native) return /* @__PURE__ */React.cloneElement(triggerElement, {
|
|
322
|
-
__onPress: function () {
|
|
323
|
-
setOpen(true);
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_dialog.Dialog, {
|
|
327
|
-
scope: dialogScope,
|
|
328
|
-
...alertDialogProps,
|
|
329
|
-
modal: true
|
|
330
|
-
});
|
|
212
|
+
var AlertDialogInner = function(props) {
|
|
213
|
+
var { scope, native, ...alertDialogProps } = props;
|
|
214
|
+
var dialogScope = getAlertDialogScope(scope);
|
|
215
|
+
var nativeAlert = (0, import_useNativeAlertDialog.useNativeAlertDialog)(props);
|
|
216
|
+
if (nativeAlert) return nativeAlert;
|
|
217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, {
|
|
218
|
+
scope: dialogScope,
|
|
219
|
+
...alertDialogProps,
|
|
220
|
+
modal: true
|
|
221
|
+
});
|
|
331
222
|
};
|
|
332
|
-
function forEachChildDeep(children, onChild) {
|
|
333
|
-
var _iteratorNormalCompletion = true,
|
|
334
|
-
_didIteratorError = false,
|
|
335
|
-
_iteratorError = void 0;
|
|
336
|
-
try {
|
|
337
|
-
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
338
|
-
var child = _step.value;
|
|
339
|
-
if (! /* @__PURE__ */React.isValidElement(child)) continue;
|
|
340
|
-
if (!onChild(child)) continue;
|
|
341
|
-
var childProps = child.props;
|
|
342
|
-
if (childProps.children) forEachChildDeep(React.Children.toArray(childProps.children), onChild);
|
|
343
|
-
}
|
|
344
|
-
} catch (err) {
|
|
345
|
-
_didIteratorError = true;
|
|
346
|
-
_iteratorError = err;
|
|
347
|
-
} finally {
|
|
348
|
-
try {
|
|
349
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
350
|
-
} finally {
|
|
351
|
-
if (_didIteratorError) throw _iteratorError;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
function getStringChildren(child) {
|
|
356
|
-
var string = "";
|
|
357
|
-
forEachChildDeep(React.Children.toArray(child), function (child2) {
|
|
358
|
-
if (typeof child2.props.children === "string") {
|
|
359
|
-
string = child2.props.children;
|
|
360
|
-
return false;
|
|
361
|
-
}
|
|
362
|
-
return true;
|
|
363
|
-
});
|
|
364
|
-
return string;
|
|
365
|
-
}
|
|
366
223
|
var AlertDialog = (0, import_helpers.withStaticProperties)(AlertDialogInner, {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
224
|
+
Trigger: AlertDialogTrigger,
|
|
225
|
+
Portal: AlertDialogPortal,
|
|
226
|
+
Overlay: AlertDialogOverlay,
|
|
227
|
+
Content: AlertDialogContent,
|
|
228
|
+
Action: AlertDialogAction,
|
|
229
|
+
Cancel: AlertDialogCancel,
|
|
230
|
+
Destructive: AlertDialogDestructive,
|
|
231
|
+
Title: AlertDialogTitle,
|
|
232
|
+
Description: AlertDialogDescription
|
|
376
233
|
});
|
|
377
234
|
AlertDialog.displayName = ROOT_NAME;
|
|
235
|
+
|
|
378
236
|
//# sourceMappingURL=AlertDialog.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","AlertDialog_exports","__export","AlertDialog","AlertDialogAction","AlertDialogCancel","AlertDialogContent","AlertDialogDescription","AlertDialogDestructive","AlertDialogOverlay","AlertDialogPortal","AlertDialogTitle","AlertDialogTrigger","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_dialog","import_helpers","import_use_controllable_state","React","__toESM","import_react_native","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","styled","View","name","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","jsx","composeEventHandlers","triggerProps","DialogTrigger","ref","AlertDialogPortal2","portalProps","DialogPortal","DialogOverlayFrame","AlertDialogOverlay2","overlayProps","DialogOverlay","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","createStyledContext","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","useComposedRefs","cancelRef","destructiveRef","DialogWarningProvider","contentName","titleName","TITLE_NAME","docsSlug","jsxs","DialogContent","role","onOpenAutoFocus","event","preventDefault","isWeb","_cancelRef_current","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","Slottable","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle2","titleProps","DialogTitle","DESCRIPTION_NAME","AlertDialogDescription2","descriptionProps","DialogDescription","ACTION_NAME","AlertDialogAction2","actionProps","DialogClose","CANCEL_NAME","AlertDialogCancel2","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructive2","destructiveProps","param","useEffect","_contentRef_current","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","open","setOpen","useControllableState","prop","defaultProp","defaultOpen","onChange","onOpenChange","transition","triggerElement","title","description","buttons","forEachChildDeep","Children","toArray","child","isValidElement","isTamaguiElement","type","staticConfig","componentName","cloneElement","getStringChildren","style","text","_childProps_onPress","childProps","call","push","useIsomorphicLayoutEffect","Alert","alert","Dialog","modal","onChild","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","err","return","string","child2","withStaticProperties","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,UAAA,KAAAC,GAAA,KAAAA,GAAA,CAAAC,UAAA,GAAAC,SAAA,CAAAC,MAAA;EAAAC,KAAA,EAAAJ,GAAA;EAAAK,UAAA;AAAA,KAAAF,MAAA,EAAAH,GAAA;AAAA,IAAAM,YAAA,GAAAN,GAAA,IAAAO,WAAA,CAAAL,SAAA;EAAAE,KAAA;AAAA,IAAAJ,GAAA;AAAA,IAAAQ,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,kBAAA,EAAAA,CAAA,KAAAA,kBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAGAC,sBAAA,EAAAA,CAAA,KAAgCA,sBAAA;EAChCC,kBAAA,EAAAA,CAAA,KAAiDA,kBAAA;EAEjDC,iBAMO,EAAAA,CAAA,KAAAA,iBAAA;EAYPC,gBAAA,EAAAA,CAAA,KAWOA,gBAAA;EACPC,kBAAA,EAA2DA,CAAA,KAAAA;AAC3D;AACAC,MAAA,CAAAC,OAAuB,GAAAf,YAAA,CAAAE,mBAAA;AACvB,IAAAc,kBAAA,GAAAC,OAAsB;AAoCZ,IAAAC,mBAAA,GAAAD,OAAA;AAlCV,IAAAE,gBAAM,GAAAF,OAAuB,qBAAmB;AAMhD,IAAAG,WAAM,GAAYH,OAAA;AAclB,IAAAI,aAAM,GAAAJ,OAAe;AAIrB,IAAAK,cAAM,G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A,CAAAvF,QAAA,GAAA+F,OAAA;IAEP;EACE,SAAIU,GAAC;IACLR,iBAAM,OAAO;IAGbC,cAAQ,GAAAO,GAAM;EAAA,UACZ;IACE;MAAkD,KAAAT,yBACtC,IAAAG,SAAA,CAAAO,MAAA,UAAAP,SAAA,CAAAO,MAAA;IAAA,UACX;MACD,IAAAT,iBAAO,QAAAC,cAAA;IAAA;EACT;AAEE;AACA,SAAAf,iBAAOA,CAAAP,KAAA;EAAA,IAAA+B,MACT;EAAAlC,gBACK,CAAAhH,KAAA,CAAAiH,QAAkB,CAAAC,OAAA,CAAAC,KAAA,aAAAgC,MAAA;IACrB,WAAAA,MAAA,CAAAtI,KAAc,CAAA0B,QAAA,aAAuB;MACrC2G,MAAA,GAAAC,MAAO,CAAAtI,KAAA,CAAA0B,QAAA;MAAA,OACT;IAAA;IACK,OACL,IAAK;EAAA;EAEH,OAAA2G,MAAA;AAMA;AACA,IAAAtK,WAAA,GAAM,IAAAkB,cAAgB,CAAAsJ,oBAAA,EAAApD,gBAAA;EACpBqD,OAAA,EAAAhK,kBAAM;EACNiK,MAAA,EAAAnK,iBAAY;EACZoK,OAAA,EAAArK,kBAAa;EAAAsK,OAAA,EACfzK,kBAAA;EACA0K,MAAA,EAAA5K,iBAAa;EAAA6K,MAAA,EAAA5K,iBACX;EAAA6K,WACA,EAAA1K,sBAAA;EAAA2K,KAAA,EAAAxK,gBAAA;EAAAyK,WAEA,EAAA7K;AAAA;AAEFJ,WAAA,CAAAkL,WAAO,GAAAzJ,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["cjs/AlertDialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AlertDialog_exports = {};\n__export(AlertDialog_exports, {\n AlertDialog: () => AlertDialog,\n AlertDialogAction: () => AlertDialogAction,\n AlertDialogCancel: () => AlertDialogCancel,\n AlertDialogContent: () => AlertDialogContent,\n AlertDialogDescription: () => AlertDialogDescription,\n AlertDialogDestructive: () => AlertDialogDestructive,\n AlertDialogOverlay: () => AlertDialogOverlay,\n AlertDialogPortal: () => AlertDialogPortal,\n AlertDialogTitle: () => AlertDialogTitle,\n AlertDialogTrigger: () => AlertDialogTrigger\n});\nmodule.exports = __toCommonJS(AlertDialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core2 = require(\"@tamagui/core\");\nvar import_dialog = require(\"@tamagui/dialog\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_alertDialogPart = require(\"./alertDialogPart\");\nvar import_useNativeAlertDialog = require(\"./useNativeAlertDialog\");\nvar getAlertDialogScope = function(scope) {\n return scope;\n};\nvar ROOT_NAME = \"AlertDialog\";\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar NativeAlertDialogTriggerFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: TRIGGER_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(NativeAlertDialogTriggerFrame, \"trigger\");\nvar AlertDialogTrigger = (0, import_core.createStyledHOC)(NativeAlertDialogTriggerFrame, function AlertDialogTrigger2(props, forwardedRef) {\n if (props[\"__native\"]) {\n var { __native, onPress, __onPress, ...rest } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeAlertDialogTriggerFrame, {\n ...rest,\n onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)\n });\n }\n var { scope, ...triggerProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTrigger, {\n scope: getAlertDialogScope(scope),\n ...triggerProps,\n ref: forwardedRef\n });\n});\nvar AlertDialogPortal = function AlertDialogPortal2(props) {\n var { scope, ...portalProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogPortal, {\n scope: getAlertDialogScope(scope),\n ...portalProps\n });\n};\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlayFrame = (0, import_core2.styled)(import_dialog.DialogOverlayFrame, {\n displayName: OVERLAY_NAME\n});\nvar AlertDialogOverlay = (0, import_core.createStyledHOC)(AlertDialogOverlayFrame, function AlertDialogOverlay2(props, forwardedRef) {\n var { scope, ...overlayProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogOverlay, {\n scope: getAlertDialogScope(scope),\n ...overlayProps,\n ref: forwardedRef\n });\n});\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core2.createStyledContext)({}, \"AlertDialogContext\");\nvar AlertDialogContent = (0, import_core.createRefComponent)(function AlertDialogContent2(props, forwardedRef) {\n var { scope, children, ...contentProps } = props;\n var dialogScope = getAlertDialogScope(scope);\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n var cancelRef = React.useRef(null);\n var destructiveRef = React.useRef(null);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogWarningProvider, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContextProvider, {\n scope,\n cancelRef,\n destructiveRef,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogContent, {\n role: \"alertdialog\",\n \"aria-modal\": true,\n scope: dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {\n event.cancel();\n if (import_constants.isWeb) {\n var _cancelRef_current;\n (_cancelRef_current = cancelRef.current) === null || _cancelRef_current === void 0 ? void 0 : _cancelRef_current.focus({\n preventScroll: true\n });\n }\n }),\n onPointerDownOutside: function(event) {\n return event.cancel();\n },\n onInteractOutside: function(event) {\n return event.cancel();\n },\n children: [\n /**\n * We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`\n * around everything, otherwise the `DescriptionWarning` would be rendered straight away.\n * This is because we want the accessibility checks to run only once the content is actually\n * open and that behaviour is already encapsulated in `DialogContent`.\n */\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slottable, {\n children\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, {\n contentRef\n })\n ]\n })\n })\n });\n});\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitleFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: TITLE_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogTitleFrame, \"title\");\nvar AlertDialogTitle = (0, import_core.createStyledHOC)(AlertDialogTitleFrame, function AlertDialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, {\n scope: getAlertDialogScope(scope),\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescriptionFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: DESCRIPTION_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogDescriptionFrame, \"description\");\nvar AlertDialogDescription = (0, import_core.createStyledHOC)(AlertDialogDescriptionFrame, function AlertDialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, {\n scope: getAlertDialogScope(scope),\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogActionFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: ACTION_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogActionFrame, \"action\");\nvar AlertDialogAction = (0, import_core.createStyledHOC)(AlertDialogActionFrame, function AlertDialogAction2(props, forwardedRef) {\n var { scope, ...actionProps } = props;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {\n scope: getAlertDialogScope(scope),\n ...actionProps,\n ref: forwardedRef\n });\n});\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancelFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: CANCEL_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogCancelFrame, \"cancel\");\nvar AlertDialogCancel = (0, import_core.createStyledHOC)(AlertDialogCancelFrame, function AlertDialogCancel2(props, forwardedRef) {\n var { scope, ...cancelProps } = props;\n var { cancelRef } = useAlertDialogContentContext(scope);\n var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {\n scope: getAlertDialogScope(scope),\n ...cancelProps,\n ref\n });\n});\nvar DESTRUCTIVE_NAME = \"AlertDialogDestructive\";\nvar AlertDialogDestructiveFrame = (0, import_core2.styled)(import_core2.View, {\n displayName: DESTRUCTIVE_NAME\n});\n(0, import_alertDialogPart.markAlertDialogPart)(AlertDialogDestructiveFrame, \"destructive\");\nvar AlertDialogDestructive = (0, import_core.createStyledHOC)(AlertDialogDestructiveFrame, function AlertDialogDestructive2(props, forwardedRef) {\n var { scope, ...destructiveProps } = props;\n var { destructiveRef } = useAlertDialogContentContext(scope);\n var ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, destructiveRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {\n scope: getAlertDialogScope(scope),\n ...destructiveProps,\n ref\n });\n});\nvar DescriptionWarning = function(param) {\n var { contentRef } = param;\n if (process.env.NODE_ENV === \"development\") {\n React.useEffect(function() {\n var _contentRef_current;\n if (!import_constants.isWeb) return;\n var hasDescription = document.getElementById((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.getAttribute(\"aria-describedby\"));\n if (!hasDescription) {\n console.warn(`\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n \n You can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n \n Alternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n \n For more information, see https://tamagui.dev/docs/components/alert-dialog`);\n }\n }, [\n contentRef\n ]);\n }\n return null;\n};\nvar AlertDialogInner = function(props) {\n var { scope, native, ...alertDialogProps } = props;\n var dialogScope = getAlertDialogScope(scope);\n var nativeAlert = (0, import_useNativeAlertDialog.useNativeAlertDialog)(props);\n if (nativeAlert) return nativeAlert;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, {\n scope: dialogScope,\n ...alertDialogProps,\n modal: true\n });\n};\nvar AlertDialog = (0, import_helpers.withStaticProperties)(AlertDialogInner, {\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Overlay: AlertDialogOverlay,\n Content: AlertDialogContent,\n Action: AlertDialogAction,\n Cancel: AlertDialogCancel,\n Destructive: AlertDialogDestructive,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n//# sourceMappingURL=AlertDialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,O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