@tamagui/alert-dialog 1.88.21 → 1.88.23
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/esm/AlertDialog.native.js +54 -71
- package/dist/esm/AlertDialog.native.js.map +1 -1
- package/dist/esm/index.native.js +1 -19
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/AlertDialog.native.js +54 -71
- package/dist/jsx/AlertDialog.native.js.map +1 -1
- package/dist/jsx/index.native.js +1 -19
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +19 -19
|
@@ -1,106 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
AlertDialog: () => AlertDialog,
|
|
27
|
-
AlertDialogAction: () => AlertDialogAction,
|
|
28
|
-
AlertDialogCancel: () => AlertDialogCancel,
|
|
29
|
-
AlertDialogContent: () => AlertDialogContent,
|
|
30
|
-
AlertDialogDescription: () => AlertDialogDescription,
|
|
31
|
-
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
32
|
-
AlertDialogPortal: () => AlertDialogPortal,
|
|
33
|
-
AlertDialogTitle: () => AlertDialogTitle,
|
|
34
|
-
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
35
|
-
createAlertDialogScope: () => createAlertDialogScope
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(AlertDialog_exports);
|
|
38
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_create_context = require("@tamagui/create-context"), import_dialog = require("@tamagui/dialog"), import_helpers = require("@tamagui/helpers"), import_use_controllable_state = require("@tamagui/use-controllable-state"), React = __toESM(require("react")), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
|
|
40
|
-
import_dialog.createDialogScope
|
|
41
|
-
]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
1
|
+
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
|
+
import { Slottable, View, isTamaguiElement, styled } from "@tamagui/core";
|
|
4
|
+
import { createContextScope } from "@tamagui/create-context";
|
|
5
|
+
import {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogClose,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogDescription,
|
|
10
|
+
DialogOverlay,
|
|
11
|
+
DialogOverlayFrame,
|
|
12
|
+
DialogPortal,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
DialogTrigger,
|
|
15
|
+
DialogWarningProvider,
|
|
16
|
+
createDialogScope
|
|
17
|
+
} from "@tamagui/dialog";
|
|
18
|
+
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
19
|
+
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { Alert } from "react-native";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
24
|
+
createDialogScope
|
|
25
|
+
]), useDialogScope = createDialogScope(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = styled(View, {
|
|
42
26
|
name: TRIGGER_NAME
|
|
43
27
|
}), AlertDialogTrigger = React.forwardRef(
|
|
44
28
|
(props, forwardedRef) => {
|
|
45
29
|
if (props.__native) {
|
|
46
30
|
const { __native, onPress, __onPress, ...rest } = props;
|
|
47
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
48
32
|
NativeAlertDialogTriggerFrame,
|
|
49
33
|
{
|
|
50
34
|
...rest,
|
|
51
|
-
onPress:
|
|
35
|
+
onPress: composeEventHandlers(onPress, __onPress)
|
|
52
36
|
}
|
|
53
37
|
);
|
|
54
38
|
}
|
|
55
39
|
const { __scopeAlertDialog, ...triggerProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
56
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx(DialogTrigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
|
57
41
|
}
|
|
58
42
|
);
|
|
59
43
|
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
|
60
44
|
const PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = (props) => {
|
|
61
45
|
const { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
62
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsx(DialogPortal, { ...dialogScope, ...portalProps });
|
|
63
47
|
};
|
|
64
48
|
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
65
|
-
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame =
|
|
49
|
+
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
66
50
|
name: OVERLAY_NAME
|
|
67
51
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
68
52
|
React.forwardRef(
|
|
69
53
|
(props, forwardedRef) => {
|
|
70
54
|
const { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
71
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsx(DialogOverlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
72
56
|
}
|
|
73
57
|
)
|
|
74
58
|
);
|
|
75
59
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
76
60
|
const CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React.forwardRef(
|
|
77
61
|
(props, forwardedRef) => {
|
|
78
|
-
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs =
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
62
|
+
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, contentRef), cancelRef = React.useRef(null);
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
DialogWarningProvider,
|
|
81
65
|
{
|
|
82
66
|
contentName: CONTENT_NAME,
|
|
83
67
|
titleName: TITLE_NAME,
|
|
84
68
|
docsSlug: "alert-dialog",
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
|
|
69
|
+
children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
|
|
70
|
+
DialogContent,
|
|
87
71
|
{
|
|
88
72
|
role: "alertdialog",
|
|
89
73
|
...dialogScope,
|
|
90
74
|
...contentProps,
|
|
91
75
|
ref: composedRefs,
|
|
92
|
-
onOpenAutoFocus:
|
|
76
|
+
onOpenAutoFocus: composeEventHandlers(
|
|
93
77
|
contentProps.onOpenAutoFocus,
|
|
94
78
|
(event) => {
|
|
95
79
|
var _a;
|
|
96
|
-
event.preventDefault(),
|
|
80
|
+
event.preventDefault(), isWeb && ((_a = cancelRef.current) == null || _a.focus({ preventScroll: !0 }));
|
|
97
81
|
}
|
|
98
82
|
),
|
|
99
83
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
100
84
|
onInteractOutside: (event) => event.preventDefault(),
|
|
101
85
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
process.env.NODE_ENV === "development" && /* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
87
|
+
process.env.NODE_ENV === "development" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
|
|
104
88
|
]
|
|
105
89
|
}
|
|
106
90
|
) })
|
|
@@ -112,32 +96,32 @@ AlertDialogContent.displayName = CONTENT_NAME;
|
|
|
112
96
|
const TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React.forwardRef(
|
|
113
97
|
(props, forwardedRef) => {
|
|
114
98
|
const { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
115
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ jsx(DialogTitle, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
116
100
|
}
|
|
117
101
|
);
|
|
118
102
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
119
103
|
const DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
|
120
104
|
const { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
121
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ jsx(DialogDescription, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
122
106
|
});
|
|
123
107
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
124
108
|
const ACTION_NAME = "AlertDialogAction", AlertDialogAction = React.forwardRef(
|
|
125
109
|
(props, forwardedRef) => {
|
|
126
110
|
const { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
127
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
128
112
|
}
|
|
129
113
|
);
|
|
130
114
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
131
115
|
const CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React.forwardRef(
|
|
132
116
|
(props, forwardedRef) => {
|
|
133
|
-
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref =
|
|
134
|
-
return /* @__PURE__ */
|
|
117
|
+
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = useComposedRefs(forwardedRef, cancelRef);
|
|
118
|
+
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...cancelProps, ref });
|
|
135
119
|
}
|
|
136
120
|
);
|
|
137
121
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
138
122
|
const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" && React.useEffect(() => {
|
|
139
123
|
var _a;
|
|
140
|
-
if (!
|
|
124
|
+
if (!isWeb)
|
|
141
125
|
return;
|
|
142
126
|
document.getElementById(
|
|
143
127
|
// @ts-ignore
|
|
@@ -153,7 +137,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
153
137
|
}, [contentRef]), null), AlertDialogInner = (props) => {
|
|
154
138
|
const { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
155
139
|
{
|
|
156
|
-
const [open, setOpen] =
|
|
140
|
+
const [open, setOpen] = useControllableState({
|
|
157
141
|
prop: props.open,
|
|
158
142
|
defaultProp: props.defaultOpen || !1,
|
|
159
143
|
onChange: props.onOpenChange,
|
|
@@ -164,7 +148,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
164
148
|
if (forEachChildDeep(React.Children.toArray(props.children), (child) => {
|
|
165
149
|
if (!React.isValidElement(child))
|
|
166
150
|
return !1;
|
|
167
|
-
const name =
|
|
151
|
+
const name = isTamaguiElement(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
168
152
|
switch (name) {
|
|
169
153
|
case TRIGGER_NAME:
|
|
170
154
|
return triggerElement = React.cloneElement(child, {
|
|
@@ -191,8 +175,8 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
191
175
|
default:
|
|
192
176
|
return !0;
|
|
193
177
|
}
|
|
194
|
-
}),
|
|
195
|
-
!open || !native || (title || description) &&
|
|
178
|
+
}), useIsomorphicLayoutEffect(() => {
|
|
179
|
+
!open || !native || (title || description) && Alert.alert(title, description, buttons);
|
|
196
180
|
}, [native, open]), native)
|
|
197
181
|
return React.cloneElement(triggerElement, {
|
|
198
182
|
__onPress: () => {
|
|
@@ -200,7 +184,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
200
184
|
}
|
|
201
185
|
});
|
|
202
186
|
}
|
|
203
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ jsx(Dialog, { ...dialogScope, ...alertDialogProps, modal: !0 });
|
|
204
188
|
};
|
|
205
189
|
function forEachChildDeep(children, onChild) {
|
|
206
190
|
for (const child of children)
|
|
@@ -210,7 +194,7 @@ function getStringChildren(child) {
|
|
|
210
194
|
let string = "";
|
|
211
195
|
return forEachChildDeep(React.Children.toArray(child), (child2) => typeof child2.props.children == "string" ? (string = child2.props.children, !1) : !0), string;
|
|
212
196
|
}
|
|
213
|
-
const AlertDialog =
|
|
197
|
+
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
214
198
|
Trigger: AlertDialogTrigger,
|
|
215
199
|
Portal: AlertDialogPortal,
|
|
216
200
|
Overlay: AlertDialogOverlay,
|
|
@@ -221,8 +205,7 @@ const AlertDialog = (0, import_helpers.withStaticProperties)(AlertDialogInner, {
|
|
|
221
205
|
Description: AlertDialogDescription
|
|
222
206
|
});
|
|
223
207
|
AlertDialog.displayName = ROOT_NAME;
|
|
224
|
-
|
|
225
|
-
0 && (module.exports = {
|
|
208
|
+
export {
|
|
226
209
|
AlertDialog,
|
|
227
210
|
AlertDialogAction,
|
|
228
211
|
AlertDialogCancel,
|
|
@@ -233,5 +216,5 @@ AlertDialog.displayName = ROOT_NAME;
|
|
|
233
216
|
AlertDialogTitle,
|
|
234
217
|
AlertDialogTrigger,
|
|
235
218
|
createAlertDialogScope
|
|
236
|
-
}
|
|
219
|
+
};
|
|
237
220
|
//# sourceMappingURL=AlertDialog.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AlertDialog.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAGA,SAAS,uBAAuB;AAChC,SAAS,OAAO,iCAAiC;AAEjD,SAAS,WAAW,MAAM,kBAAkB,cAAc;AAE1D,SAAS,0BAA0B;AAWnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,4BAA4B;AACrC,YAAY,WAAW;AACvB,SAAS,aAAa;AAoCd,cAwFE,YAxFF;AA9BR,MAAM,YAAY,eAGZ,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,WAAW;AAAA,EACvF;AACF,CAAC,GAEK,iBAAiB,kBAAkB,GAUnC,eAAe,sBAIf,gCAAgC,OAAO,MAAM;AAAA,EACjD,MAAM;AACR,CAAC,GAEK,qBAAqB,MAAM;AAAA,EAC/B,CAAC,OAA6C,iBAAiB;AAC7D,QAAI,MAAM,UAAa;AACrB,YAAM,EAAE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I,SAAS;AACb,0BAAiB,MAAM,SAAS,QAAQ,KAAK,GAAG,CAACA,WAC3C,OAAOA,OAAM,MAAM,YAAa,YAClC,SAASA,OAAM,MAAM,UACd,MAEF,EACR,GACM;AACT;AAEA,MAAM,cAAc,qBAAqB,kBAAkB;AAAA,EACzD,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AACf,CAAC;AAED,YAAY,cAAc;",
|
|
5
5
|
"names": ["child"]
|
|
6
6
|
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./AlertDialog"), module.exports);
|
|
16
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./AlertDialog")
|
|
19
|
-
});
|
|
1
|
+
export * from "./AlertDialog";
|
|
20
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,106 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
AlertDialog: () => AlertDialog,
|
|
27
|
-
AlertDialogAction: () => AlertDialogAction,
|
|
28
|
-
AlertDialogCancel: () => AlertDialogCancel,
|
|
29
|
-
AlertDialogContent: () => AlertDialogContent,
|
|
30
|
-
AlertDialogDescription: () => AlertDialogDescription,
|
|
31
|
-
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
32
|
-
AlertDialogPortal: () => AlertDialogPortal,
|
|
33
|
-
AlertDialogTitle: () => AlertDialogTitle,
|
|
34
|
-
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
35
|
-
createAlertDialogScope: () => createAlertDialogScope
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(AlertDialog_exports);
|
|
38
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_create_context = require("@tamagui/create-context"), import_dialog = require("@tamagui/dialog"), import_helpers = require("@tamagui/helpers"), import_use_controllable_state = require("@tamagui/use-controllable-state"), React = __toESM(require("react")), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
|
|
40
|
-
import_dialog.createDialogScope
|
|
41
|
-
]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core.styled)(import_core.View, {
|
|
1
|
+
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
3
|
+
import { Slottable, View, isTamaguiElement, styled } from "@tamagui/core";
|
|
4
|
+
import { createContextScope } from "@tamagui/create-context";
|
|
5
|
+
import {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogClose,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogDescription,
|
|
10
|
+
DialogOverlay,
|
|
11
|
+
DialogOverlayFrame,
|
|
12
|
+
DialogPortal,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
DialogTrigger,
|
|
15
|
+
DialogWarningProvider,
|
|
16
|
+
createDialogScope
|
|
17
|
+
} from "@tamagui/dialog";
|
|
18
|
+
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
19
|
+
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import { Alert } from "react-native";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
24
|
+
createDialogScope
|
|
25
|
+
]), useDialogScope = createDialogScope(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = styled(View, {
|
|
42
26
|
name: TRIGGER_NAME
|
|
43
27
|
}), AlertDialogTrigger = React.forwardRef(
|
|
44
28
|
(props, forwardedRef) => {
|
|
45
29
|
if (props.__native) {
|
|
46
30
|
const { __native, onPress, __onPress, ...rest } = props;
|
|
47
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
48
32
|
NativeAlertDialogTriggerFrame,
|
|
49
33
|
{
|
|
50
34
|
...rest,
|
|
51
|
-
onPress:
|
|
35
|
+
onPress: composeEventHandlers(onPress, __onPress)
|
|
52
36
|
}
|
|
53
37
|
);
|
|
54
38
|
}
|
|
55
39
|
const { __scopeAlertDialog, ...triggerProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
56
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx(DialogTrigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
|
57
41
|
}
|
|
58
42
|
);
|
|
59
43
|
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
|
60
44
|
const PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = (props) => {
|
|
61
45
|
const { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
62
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsx(DialogPortal, { ...dialogScope, ...portalProps });
|
|
63
47
|
};
|
|
64
48
|
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
65
|
-
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame =
|
|
49
|
+
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
66
50
|
name: OVERLAY_NAME
|
|
67
51
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
68
52
|
React.forwardRef(
|
|
69
53
|
(props, forwardedRef) => {
|
|
70
54
|
const { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
71
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ jsx(DialogOverlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
72
56
|
}
|
|
73
57
|
)
|
|
74
58
|
);
|
|
75
59
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
76
60
|
const CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React.forwardRef(
|
|
77
61
|
(props, forwardedRef) => {
|
|
78
|
-
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs =
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
62
|
+
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, contentRef), cancelRef = React.useRef(null);
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
DialogWarningProvider,
|
|
81
65
|
{
|
|
82
66
|
contentName: CONTENT_NAME,
|
|
83
67
|
titleName: TITLE_NAME,
|
|
84
68
|
docsSlug: "alert-dialog",
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
|
|
69
|
+
children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
|
|
70
|
+
DialogContent,
|
|
87
71
|
{
|
|
88
72
|
role: "alertdialog",
|
|
89
73
|
...dialogScope,
|
|
90
74
|
...contentProps,
|
|
91
75
|
ref: composedRefs,
|
|
92
|
-
onOpenAutoFocus:
|
|
76
|
+
onOpenAutoFocus: composeEventHandlers(
|
|
93
77
|
contentProps.onOpenAutoFocus,
|
|
94
78
|
(event) => {
|
|
95
79
|
var _a;
|
|
96
|
-
event.preventDefault(),
|
|
80
|
+
event.preventDefault(), isWeb && ((_a = cancelRef.current) == null || _a.focus({ preventScroll: !0 }));
|
|
97
81
|
}
|
|
98
82
|
),
|
|
99
83
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
100
84
|
onInteractOutside: (event) => event.preventDefault(),
|
|
101
85
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
process.env.NODE_ENV === "development" && /* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
87
|
+
process.env.NODE_ENV === "development" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
|
|
104
88
|
]
|
|
105
89
|
}
|
|
106
90
|
) })
|
|
@@ -112,32 +96,32 @@ AlertDialogContent.displayName = CONTENT_NAME;
|
|
|
112
96
|
const TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React.forwardRef(
|
|
113
97
|
(props, forwardedRef) => {
|
|
114
98
|
const { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
115
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ jsx(DialogTitle, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
116
100
|
}
|
|
117
101
|
);
|
|
118
102
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
119
103
|
const DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
|
120
104
|
const { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
121
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ jsx(DialogDescription, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
122
106
|
});
|
|
123
107
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
124
108
|
const ACTION_NAME = "AlertDialogAction", AlertDialogAction = React.forwardRef(
|
|
125
109
|
(props, forwardedRef) => {
|
|
126
110
|
const { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
127
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
128
112
|
}
|
|
129
113
|
);
|
|
130
114
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
131
115
|
const CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React.forwardRef(
|
|
132
116
|
(props, forwardedRef) => {
|
|
133
|
-
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref =
|
|
134
|
-
return /* @__PURE__ */
|
|
117
|
+
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = useComposedRefs(forwardedRef, cancelRef);
|
|
118
|
+
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...cancelProps, ref });
|
|
135
119
|
}
|
|
136
120
|
);
|
|
137
121
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
138
122
|
const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" && React.useEffect(() => {
|
|
139
123
|
var _a;
|
|
140
|
-
if (!
|
|
124
|
+
if (!isWeb)
|
|
141
125
|
return;
|
|
142
126
|
document.getElementById(
|
|
143
127
|
// @ts-ignore
|
|
@@ -153,7 +137,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
153
137
|
}, [contentRef]), null), AlertDialogInner = (props) => {
|
|
154
138
|
const { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
155
139
|
{
|
|
156
|
-
const [open, setOpen] =
|
|
140
|
+
const [open, setOpen] = useControllableState({
|
|
157
141
|
prop: props.open,
|
|
158
142
|
defaultProp: props.defaultOpen || !1,
|
|
159
143
|
onChange: props.onOpenChange,
|
|
@@ -164,7 +148,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
164
148
|
if (forEachChildDeep(React.Children.toArray(props.children), (child) => {
|
|
165
149
|
if (!React.isValidElement(child))
|
|
166
150
|
return !1;
|
|
167
|
-
const name =
|
|
151
|
+
const name = isTamaguiElement(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
168
152
|
switch (name) {
|
|
169
153
|
case TRIGGER_NAME:
|
|
170
154
|
return triggerElement = React.cloneElement(child, {
|
|
@@ -191,8 +175,8 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
191
175
|
default:
|
|
192
176
|
return !0;
|
|
193
177
|
}
|
|
194
|
-
}),
|
|
195
|
-
!open || !native || (title || description) &&
|
|
178
|
+
}), useIsomorphicLayoutEffect(() => {
|
|
179
|
+
!open || !native || (title || description) && Alert.alert(title, description, buttons);
|
|
196
180
|
}, [native, open]), native)
|
|
197
181
|
return React.cloneElement(triggerElement, {
|
|
198
182
|
__onPress: () => {
|
|
@@ -200,7 +184,7 @@ const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "develo
|
|
|
200
184
|
}
|
|
201
185
|
});
|
|
202
186
|
}
|
|
203
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ jsx(Dialog, { ...dialogScope, ...alertDialogProps, modal: !0 });
|
|
204
188
|
};
|
|
205
189
|
function forEachChildDeep(children, onChild) {
|
|
206
190
|
for (const child of children)
|
|
@@ -210,7 +194,7 @@ function getStringChildren(child) {
|
|
|
210
194
|
let string = "";
|
|
211
195
|
return forEachChildDeep(React.Children.toArray(child), (child2) => typeof child2.props.children == "string" ? (string = child2.props.children, !1) : !0), string;
|
|
212
196
|
}
|
|
213
|
-
const AlertDialog =
|
|
197
|
+
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
214
198
|
Trigger: AlertDialogTrigger,
|
|
215
199
|
Portal: AlertDialogPortal,
|
|
216
200
|
Overlay: AlertDialogOverlay,
|
|
@@ -221,8 +205,7 @@ const AlertDialog = (0, import_helpers.withStaticProperties)(AlertDialogInner, {
|
|
|
221
205
|
Description: AlertDialogDescription
|
|
222
206
|
});
|
|
223
207
|
AlertDialog.displayName = ROOT_NAME;
|
|
224
|
-
|
|
225
|
-
0 && (module.exports = {
|
|
208
|
+
export {
|
|
226
209
|
AlertDialog,
|
|
227
210
|
AlertDialogAction,
|
|
228
211
|
AlertDialogCancel,
|
|
@@ -233,5 +216,5 @@ AlertDialog.displayName = ROOT_NAME;
|
|
|
233
216
|
AlertDialogTitle,
|
|
234
217
|
AlertDialogTrigger,
|
|
235
218
|
createAlertDialogScope
|
|
236
|
-
}
|
|
219
|
+
};
|
|
237
220
|
//# sourceMappingURL=AlertDialog.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AlertDialog.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAGA,SAAS,uBAAuB;AAChC,SAAS,OAAO,iCAAiC;AAEjD,SAAS,WAAW,MAAM,kBAAkB,cAAc;AAE1D,SAAS,0BAA0B;AAWnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB,4BAA4B;AAC3D,SAAS,4BAA4B;AACrC,YAAY,WAAW;AACvB,SAAS,aAAa;AAoCd,cAwFE,YAxFF;AA9BR,MAAM,YAAY,eAGZ,CAAC,0BAA0B,sBAAsB,IAAI,mBAAmB,WAAW;AAAA,EACvF;AACF,CAAC,GAEK,iBAAiB,kBAAkB,GAUnC,eAAe,sBAIf,gCAAgC,OAAO,MAAM;AAAA,EACjD,MAAM;AACR,CAAC,GAEK,qBAAqB,MAAM;AAAA,EAC/B,CAAC,OAA6C,iBAAiB;AAC7D,QAAI,MAAM,UAAa;AACrB,YAAM,EAAE,UAAU,SAAS,WAAW,GAAG,KAAK,IAAI;AAClD,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ,SAAS,qBAAqB,SAAS,SAAS;AAAA;AAAA,MAClD;AAAA,IAEJ;AAEA,UAAM,EAAE,oBAAoB,GAAG,aAAa,IAAI,OAC1C,cAAc,eAAe,kBAAkB;AACrD,WAAO,oBAAC,iBAAe,GAAG,aAAc,GAAG,cAAc,KAAK,cAAc;AAAA,EAC9E;AACF;AAEA,mBAAmB,cAAc;AAM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,YAAY,cAAc;",
|
|
5
5
|
"names": ["child"]
|
|
6
6
|
}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./AlertDialog"), module.exports);
|
|
16
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./AlertDialog")
|
|
19
|
-
});
|
|
1
|
+
export * from "./AlertDialog";
|
|
20
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/alert-dialog",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -33,30 +33,30 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/animate-presence": "1.88.
|
|
37
|
-
"@tamagui/aria-hidden": "1.88.
|
|
38
|
-
"@tamagui/compose-refs": "1.88.
|
|
39
|
-
"@tamagui/constants": "1.88.
|
|
40
|
-
"@tamagui/core": "1.88.
|
|
41
|
-
"@tamagui/create-context": "1.88.
|
|
42
|
-
"@tamagui/dialog": "1.88.
|
|
43
|
-
"@tamagui/dismissable": "1.88.
|
|
44
|
-
"@tamagui/focus-scope": "1.88.
|
|
45
|
-
"@tamagui/helpers": "1.88.
|
|
46
|
-
"@tamagui/polyfill-dev": "1.88.
|
|
47
|
-
"@tamagui/popper": "1.88.
|
|
48
|
-
"@tamagui/portal": "1.88.
|
|
49
|
-
"@tamagui/remove-scroll": "1.88.
|
|
50
|
-
"@tamagui/stacks": "1.88.
|
|
51
|
-
"@tamagui/text": "1.88.
|
|
52
|
-
"@tamagui/use-controllable-state": "1.88.
|
|
36
|
+
"@tamagui/animate-presence": "1.88.23",
|
|
37
|
+
"@tamagui/aria-hidden": "1.88.23",
|
|
38
|
+
"@tamagui/compose-refs": "1.88.23",
|
|
39
|
+
"@tamagui/constants": "1.88.23",
|
|
40
|
+
"@tamagui/core": "1.88.23",
|
|
41
|
+
"@tamagui/create-context": "1.88.23",
|
|
42
|
+
"@tamagui/dialog": "1.88.23",
|
|
43
|
+
"@tamagui/dismissable": "1.88.23",
|
|
44
|
+
"@tamagui/focus-scope": "1.88.23",
|
|
45
|
+
"@tamagui/helpers": "1.88.23",
|
|
46
|
+
"@tamagui/polyfill-dev": "1.88.23",
|
|
47
|
+
"@tamagui/popper": "1.88.23",
|
|
48
|
+
"@tamagui/portal": "1.88.23",
|
|
49
|
+
"@tamagui/remove-scroll": "1.88.23",
|
|
50
|
+
"@tamagui/stacks": "1.88.23",
|
|
51
|
+
"@tamagui/text": "1.88.23",
|
|
52
|
+
"@tamagui/use-controllable-state": "1.88.23"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "*",
|
|
56
56
|
"react-native": "*"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@tamagui/build": "1.88.
|
|
59
|
+
"@tamagui/build": "1.88.23",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-native": "^0.72.6"
|
|
62
62
|
},
|