@tamagui/alert-dialog 1.61.2 → 1.62.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/cjs/AlertDialog.js +40 -185
- package/dist/cjs/AlertDialog.js.map +2 -2
- package/dist/cjs/AlertDialog.native.js +233 -0
- package/dist/cjs/AlertDialog.native.js.map +6 -0
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +20 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/AlertDialog.js +35 -169
- package/dist/esm/AlertDialog.js.map +2 -2
- package/dist/jsx/AlertDialog.js +33 -164
- package/dist/jsx/AlertDialog.js.map +2 -2
- package/dist/jsx/AlertDialog.native.js +219 -0
- package/dist/jsx/AlertDialog.native.js.map +6 -0
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +6 -0
- package/package.json +17 -17
package/dist/esm/AlertDialog.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
2
|
import {
|
|
4
3
|
Slottable,
|
|
5
4
|
View,
|
|
6
5
|
composeEventHandlers,
|
|
7
|
-
isTamaguiElement,
|
|
8
6
|
isWeb,
|
|
9
7
|
styled,
|
|
10
|
-
useIsomorphicLayoutEffect,
|
|
11
8
|
withStaticProperties
|
|
12
9
|
} from "@tamagui/core";
|
|
13
10
|
import { createContextScope } from "@tamagui/create-context";
|
|
@@ -24,21 +21,17 @@ import {
|
|
|
24
21
|
DialogWarningProvider,
|
|
25
22
|
createDialogScope
|
|
26
23
|
} from "@tamagui/dialog";
|
|
27
|
-
import
|
|
24
|
+
import "@tamagui/use-controllable-state";
|
|
28
25
|
import * as React from "react";
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
const [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
26
|
+
import "react-native";
|
|
27
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
32
29
|
createDialogScope
|
|
33
|
-
])
|
|
34
|
-
const useDialogScope = createDialogScope();
|
|
35
|
-
const TRIGGER_NAME = "AlertDialogTrigger";
|
|
36
|
-
const NativeAlertDialogTriggerFrame = styled(View, {
|
|
30
|
+
]), useDialogScope = createDialogScope(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = styled(View, {
|
|
37
31
|
name: TRIGGER_NAME
|
|
38
|
-
})
|
|
39
|
-
const AlertDialogTrigger = React.forwardRef(
|
|
32
|
+
}), AlertDialogTrigger = React.forwardRef(
|
|
40
33
|
(props, forwardedRef) => {
|
|
41
|
-
if (props
|
|
34
|
+
if (props.__native) {
|
|
42
35
|
const { __native, onPress, __onPress, ...rest } = props;
|
|
43
36
|
return /* @__PURE__ */ jsx(
|
|
44
37
|
NativeAlertDialogTriggerFrame,
|
|
@@ -48,42 +41,30 @@ const AlertDialogTrigger = React.forwardRef(
|
|
|
48
41
|
}
|
|
49
42
|
);
|
|
50
43
|
}
|
|
51
|
-
const { __scopeAlertDialog, ...triggerProps } = props;
|
|
52
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
44
|
+
const { __scopeAlertDialog, ...triggerProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
53
45
|
return /* @__PURE__ */ jsx(DialogTrigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
|
54
46
|
}
|
|
55
47
|
);
|
|
56
48
|
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
|
57
|
-
const PORTAL_NAME = "AlertDialogPortal"
|
|
58
|
-
const
|
|
59
|
-
const { __scopeAlertDialog, ...portalProps } = props;
|
|
60
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
49
|
+
const PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = (props) => {
|
|
50
|
+
const { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
61
51
|
return /* @__PURE__ */ jsx(DialogPortal, { ...dialogScope, ...portalProps });
|
|
62
52
|
};
|
|
63
53
|
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
64
|
-
const OVERLAY_NAME = "AlertDialogOverlay"
|
|
65
|
-
const AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
54
|
+
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
66
55
|
name: OVERLAY_NAME
|
|
67
|
-
})
|
|
68
|
-
const AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
56
|
+
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
69
57
|
React.forwardRef(
|
|
70
58
|
(props, forwardedRef) => {
|
|
71
|
-
const { __scopeAlertDialog, ...overlayProps } = props;
|
|
72
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
59
|
+
const { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
73
60
|
return /* @__PURE__ */ jsx(DialogOverlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
74
61
|
}
|
|
75
62
|
)
|
|
76
63
|
);
|
|
77
64
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
78
|
-
const CONTENT_NAME = "AlertDialogContent"
|
|
79
|
-
const [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
|
|
80
|
-
const AlertDialogContent = React.forwardRef(
|
|
65
|
+
const CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React.forwardRef(
|
|
81
66
|
(props, forwardedRef) => {
|
|
82
|
-
const { __scopeAlertDialog, children, ...contentProps } = props;
|
|
83
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
84
|
-
const contentRef = React.useRef(null);
|
|
85
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
86
|
-
const cancelRef = React.useRef(null);
|
|
67
|
+
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, contentRef), cancelRef = React.useRef(null);
|
|
87
68
|
return /* @__PURE__ */ jsx(
|
|
88
69
|
DialogWarningProvider,
|
|
89
70
|
{
|
|
@@ -100,11 +81,7 @@ const AlertDialogContent = React.forwardRef(
|
|
|
100
81
|
onOpenAutoFocus: composeEventHandlers(
|
|
101
82
|
contentProps.onOpenAutoFocus,
|
|
102
83
|
(event) => {
|
|
103
|
-
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
if (isWeb) {
|
|
106
|
-
(_a = cancelRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
107
|
-
}
|
|
84
|
+
event.preventDefault(), isWeb && cancelRef.current?.focus({ preventScroll: !0 });
|
|
108
85
|
}
|
|
109
86
|
),
|
|
110
87
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
@@ -120,161 +97,50 @@ const AlertDialogContent = React.forwardRef(
|
|
|
120
97
|
}
|
|
121
98
|
);
|
|
122
99
|
AlertDialogContent.displayName = CONTENT_NAME;
|
|
123
|
-
const TITLE_NAME = "AlertDialogTitle"
|
|
124
|
-
const AlertDialogTitle = React.forwardRef(
|
|
100
|
+
const TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React.forwardRef(
|
|
125
101
|
(props, forwardedRef) => {
|
|
126
|
-
const { __scopeAlertDialog, ...titleProps } = props;
|
|
127
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
102
|
+
const { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
128
103
|
return /* @__PURE__ */ jsx(DialogTitle, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
129
104
|
}
|
|
130
105
|
);
|
|
131
106
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
132
|
-
const DESCRIPTION_NAME = "AlertDialogDescription"
|
|
133
|
-
const
|
|
134
|
-
const { __scopeAlertDialog, ...descriptionProps } = props;
|
|
135
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
107
|
+
const DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
|
108
|
+
const { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
136
109
|
return /* @__PURE__ */ jsx(DialogDescription, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
137
110
|
});
|
|
138
111
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
139
|
-
const ACTION_NAME = "AlertDialogAction"
|
|
140
|
-
const AlertDialogAction = React.forwardRef(
|
|
112
|
+
const ACTION_NAME = "AlertDialogAction", AlertDialogAction = React.forwardRef(
|
|
141
113
|
(props, forwardedRef) => {
|
|
142
|
-
const { __scopeAlertDialog, ...actionProps } = props;
|
|
143
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
114
|
+
const { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
144
115
|
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
145
116
|
}
|
|
146
117
|
);
|
|
147
118
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
148
|
-
const CANCEL_NAME = "AlertDialogCancel"
|
|
149
|
-
const AlertDialogCancel = React.forwardRef(
|
|
119
|
+
const CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React.forwardRef(
|
|
150
120
|
(props, forwardedRef) => {
|
|
151
|
-
const { __scopeAlertDialog, ...cancelProps } = props;
|
|
152
|
-
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
153
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
154
|
-
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
121
|
+
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = useComposedRefs(forwardedRef, cancelRef);
|
|
155
122
|
return /* @__PURE__ */ jsx(DialogClose, { ...dialogScope, ...cancelProps, ref });
|
|
156
123
|
}
|
|
157
124
|
);
|
|
158
125
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
159
|
-
const DescriptionWarning = ({ contentRef }) => {
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
168
|
-
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
169
|
-
);
|
|
170
|
-
if (!hasDescription) {
|
|
171
|
-
console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
126
|
+
const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" && React.useEffect(() => {
|
|
127
|
+
if (!isWeb)
|
|
128
|
+
return;
|
|
129
|
+
document.getElementById(
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
132
|
+
contentRef.current?.getAttribute("aria-describedby")
|
|
133
|
+
) || console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
172
134
|
|
|
173
135
|
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.
|
|
174
136
|
|
|
175
137
|
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.
|
|
176
138
|
|
|
177
139
|
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
return null;
|
|
140
|
+
}, [contentRef]), null), AlertDialogInner = (props) => {
|
|
141
|
+
const { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
142
|
+
return /* @__PURE__ */ jsx(Dialog, { ...dialogScope, ...alertDialogProps, modal: !0 });
|
|
182
143
|
};
|
|
183
|
-
const AlertDialogInner = (props) => {
|
|
184
|
-
const { __scopeAlertDialog, native, ...alertDialogProps } = props;
|
|
185
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
186
|
-
if (process.env.TAMAGUI_TARGET === "native") {
|
|
187
|
-
const [open, setOpen] = useControllableState({
|
|
188
|
-
prop: props.open,
|
|
189
|
-
defaultProp: props.defaultOpen || false,
|
|
190
|
-
onChange: props.onOpenChange,
|
|
191
|
-
transition: true
|
|
192
|
-
});
|
|
193
|
-
let triggerElement = null;
|
|
194
|
-
let title = "";
|
|
195
|
-
let description = "";
|
|
196
|
-
const buttons = [];
|
|
197
|
-
forEachChildDeep(React.Children.toArray(props.children), (child) => {
|
|
198
|
-
if (!React.isValidElement(child))
|
|
199
|
-
return false;
|
|
200
|
-
const name = isTamaguiElement(child) ? child.type.staticConfig.componentName : child.type["displayName"];
|
|
201
|
-
switch (name) {
|
|
202
|
-
case TRIGGER_NAME: {
|
|
203
|
-
triggerElement = React.cloneElement(child, {
|
|
204
|
-
__native: true
|
|
205
|
-
});
|
|
206
|
-
return false;
|
|
207
|
-
}
|
|
208
|
-
case TITLE_NAME: {
|
|
209
|
-
title = getStringChildren(child);
|
|
210
|
-
return false;
|
|
211
|
-
}
|
|
212
|
-
case DESCRIPTION_NAME: {
|
|
213
|
-
description = getStringChildren(child);
|
|
214
|
-
return false;
|
|
215
|
-
}
|
|
216
|
-
case ACTION_NAME:
|
|
217
|
-
case CANCEL_NAME: {
|
|
218
|
-
const style = name === ACTION_NAME ? "default" : "cancel";
|
|
219
|
-
const text = getStringChildren(child);
|
|
220
|
-
const onPress = () => {
|
|
221
|
-
var _a;
|
|
222
|
-
const childProps = child.props;
|
|
223
|
-
(_a = childProps == null ? void 0 : childProps.onPress) == null ? void 0 : _a.call(childProps, { native: true });
|
|
224
|
-
setOpen(false);
|
|
225
|
-
};
|
|
226
|
-
buttons.push({
|
|
227
|
-
style,
|
|
228
|
-
text,
|
|
229
|
-
// @ts-ignore
|
|
230
|
-
onPress
|
|
231
|
-
});
|
|
232
|
-
return false;
|
|
233
|
-
}
|
|
234
|
-
default: {
|
|
235
|
-
return true;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
useIsomorphicLayoutEffect(() => {
|
|
240
|
-
if (!open || !native)
|
|
241
|
-
return;
|
|
242
|
-
if (title || description) {
|
|
243
|
-
Alert.alert(title, description, buttons);
|
|
244
|
-
}
|
|
245
|
-
}, [native, open]);
|
|
246
|
-
if (native) {
|
|
247
|
-
return React.cloneElement(triggerElement, {
|
|
248
|
-
__onPress: () => {
|
|
249
|
-
setOpen(true);
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return /* @__PURE__ */ jsx(Dialog, { ...dialogScope, ...alertDialogProps, modal: true });
|
|
255
|
-
};
|
|
256
|
-
function forEachChildDeep(children, onChild) {
|
|
257
|
-
for (const child of children) {
|
|
258
|
-
if (!React.isValidElement(child))
|
|
259
|
-
continue;
|
|
260
|
-
if (!onChild(child))
|
|
261
|
-
continue;
|
|
262
|
-
if (child.props.children) {
|
|
263
|
-
forEachChildDeep(React.Children.toArray(child.props.children), onChild);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
function getStringChildren(child) {
|
|
268
|
-
let string = "";
|
|
269
|
-
forEachChildDeep(React.Children.toArray(child), (child2) => {
|
|
270
|
-
if (typeof child2.props.children === "string") {
|
|
271
|
-
string = child2.props.children;
|
|
272
|
-
return false;
|
|
273
|
-
}
|
|
274
|
-
return true;
|
|
275
|
-
});
|
|
276
|
-
return string;
|
|
277
|
-
}
|
|
278
144
|
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
279
145
|
Trigger: AlertDialogTrigger,
|
|
280
146
|
Portal: AlertDialogPortal,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AlertDialog.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAGA,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAgB,0BAA0B;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EAGA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEP,OAAqC;AACrC,YAAY,WAAW;AACvB,OAAsB;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;AA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-
useIsomorphicLayoutEffect,
|
|
10
8
|
withStaticProperties
|
|
11
9
|
} from "@tamagui/core";
|
|
12
10
|
import { createContextScope } from "@tamagui/create-context";
|
|
@@ -23,63 +21,46 @@ import {
|
|
|
23
21
|
DialogWarningProvider,
|
|
24
22
|
createDialogScope
|
|
25
23
|
} from "@tamagui/dialog";
|
|
26
|
-
import
|
|
24
|
+
import "@tamagui/use-controllable-state";
|
|
27
25
|
import * as React from "react";
|
|
28
|
-
import
|
|
29
|
-
const ROOT_NAME = "AlertDialog"
|
|
30
|
-
const [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
26
|
+
import "react-native";
|
|
27
|
+
const ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
31
28
|
createDialogScope
|
|
32
|
-
])
|
|
33
|
-
const useDialogScope = createDialogScope();
|
|
34
|
-
const TRIGGER_NAME = "AlertDialogTrigger";
|
|
35
|
-
const NativeAlertDialogTriggerFrame = styled(View, {
|
|
29
|
+
]), useDialogScope = createDialogScope(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = styled(View, {
|
|
36
30
|
name: TRIGGER_NAME
|
|
37
|
-
})
|
|
38
|
-
const AlertDialogTrigger = React.forwardRef(
|
|
31
|
+
}), AlertDialogTrigger = React.forwardRef(
|
|
39
32
|
(props, forwardedRef) => {
|
|
40
|
-
if (props
|
|
33
|
+
if (props.__native) {
|
|
41
34
|
const { __native, onPress, __onPress, ...rest } = props;
|
|
42
35
|
return <NativeAlertDialogTriggerFrame
|
|
43
36
|
{...rest}
|
|
44
37
|
onPress={composeEventHandlers(onPress, __onPress)}
|
|
45
38
|
/>;
|
|
46
39
|
}
|
|
47
|
-
const { __scopeAlertDialog, ...triggerProps } = props;
|
|
48
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
40
|
+
const { __scopeAlertDialog, ...triggerProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
49
41
|
return <DialogTrigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;
|
|
50
42
|
}
|
|
51
43
|
);
|
|
52
44
|
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
|
53
|
-
const PORTAL_NAME = "AlertDialogPortal"
|
|
54
|
-
const
|
|
55
|
-
const { __scopeAlertDialog, ...portalProps } = props;
|
|
56
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
45
|
+
const PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = (props) => {
|
|
46
|
+
const { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
57
47
|
return <DialogPortal {...dialogScope} {...portalProps} />;
|
|
58
48
|
};
|
|
59
49
|
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
60
|
-
const OVERLAY_NAME = "AlertDialogOverlay"
|
|
61
|
-
const AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
50
|
+
const OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
62
51
|
name: OVERLAY_NAME
|
|
63
|
-
})
|
|
64
|
-
const AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
52
|
+
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
65
53
|
React.forwardRef(
|
|
66
54
|
(props, forwardedRef) => {
|
|
67
|
-
const { __scopeAlertDialog, ...overlayProps } = props;
|
|
68
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
55
|
+
const { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
69
56
|
return <DialogOverlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;
|
|
70
57
|
}
|
|
71
58
|
)
|
|
72
59
|
);
|
|
73
60
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
74
|
-
const CONTENT_NAME = "AlertDialogContent"
|
|
75
|
-
const [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
|
|
76
|
-
const AlertDialogContent = React.forwardRef(
|
|
61
|
+
const CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React.forwardRef(
|
|
77
62
|
(props, forwardedRef) => {
|
|
78
|
-
const { __scopeAlertDialog, children, ...contentProps } = props;
|
|
79
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
80
|
-
const contentRef = React.useRef(null);
|
|
81
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
82
|
-
const cancelRef = React.useRef(null);
|
|
63
|
+
const { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React.useRef(null), composedRefs = useComposedRefs(forwardedRef, contentRef), cancelRef = React.useRef(null);
|
|
83
64
|
return <DialogWarningProvider
|
|
84
65
|
contentName={CONTENT_NAME}
|
|
85
66
|
titleName={TITLE_NAME}
|
|
@@ -92,10 +73,7 @@ const AlertDialogContent = React.forwardRef(
|
|
|
92
73
|
onOpenAutoFocus={composeEventHandlers(
|
|
93
74
|
contentProps.onOpenAutoFocus,
|
|
94
75
|
(event) => {
|
|
95
|
-
event.preventDefault();
|
|
96
|
-
if (isWeb) {
|
|
97
|
-
cancelRef.current?.focus({ preventScroll: true });
|
|
98
|
-
}
|
|
76
|
+
event.preventDefault(), isWeb && cancelRef.current?.focus({ preventScroll: !0 });
|
|
99
77
|
}
|
|
100
78
|
)}
|
|
101
79
|
onPointerDownOutside={(event) => event.preventDefault()}
|
|
@@ -115,159 +93,50 @@ const AlertDialogContent = React.forwardRef(
|
|
|
115
93
|
}
|
|
116
94
|
);
|
|
117
95
|
AlertDialogContent.displayName = CONTENT_NAME;
|
|
118
|
-
const TITLE_NAME = "AlertDialogTitle"
|
|
119
|
-
const AlertDialogTitle = React.forwardRef(
|
|
96
|
+
const TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React.forwardRef(
|
|
120
97
|
(props, forwardedRef) => {
|
|
121
|
-
const { __scopeAlertDialog, ...titleProps } = props;
|
|
122
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
98
|
+
const { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
123
99
|
return <DialogTitle {...dialogScope} {...titleProps} ref={forwardedRef} />;
|
|
124
100
|
}
|
|
125
101
|
);
|
|
126
102
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
127
|
-
const DESCRIPTION_NAME = "AlertDialogDescription"
|
|
128
|
-
const
|
|
129
|
-
const { __scopeAlertDialog, ...descriptionProps } = props;
|
|
130
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
103
|
+
const DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
|
104
|
+
const { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
131
105
|
return <DialogDescription {...dialogScope} {...descriptionProps} ref={forwardedRef} />;
|
|
132
106
|
});
|
|
133
107
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
134
|
-
const ACTION_NAME = "AlertDialogAction"
|
|
135
|
-
const AlertDialogAction = React.forwardRef(
|
|
108
|
+
const ACTION_NAME = "AlertDialogAction", AlertDialogAction = React.forwardRef(
|
|
136
109
|
(props, forwardedRef) => {
|
|
137
|
-
const { __scopeAlertDialog, ...actionProps } = props;
|
|
138
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
110
|
+
const { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
139
111
|
return <DialogClose {...dialogScope} {...actionProps} ref={forwardedRef} />;
|
|
140
112
|
}
|
|
141
113
|
);
|
|
142
114
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
143
|
-
const CANCEL_NAME = "AlertDialogCancel"
|
|
144
|
-
const AlertDialogCancel = React.forwardRef(
|
|
115
|
+
const CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React.forwardRef(
|
|
145
116
|
(props, forwardedRef) => {
|
|
146
|
-
const { __scopeAlertDialog, ...cancelProps } = props;
|
|
147
|
-
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
148
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
149
|
-
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
117
|
+
const { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = useComposedRefs(forwardedRef, cancelRef);
|
|
150
118
|
return <DialogClose {...dialogScope} {...cancelProps} ref={ref} />;
|
|
151
119
|
}
|
|
152
120
|
);
|
|
153
121
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
154
|
-
const DescriptionWarning = ({ contentRef }) => {
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
contentRef.current?.getAttribute("aria-describedby")
|
|
163
|
-
);
|
|
164
|
-
if (!hasDescription) {
|
|
165
|
-
console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
122
|
+
const DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" && React.useEffect(() => {
|
|
123
|
+
if (!isWeb)
|
|
124
|
+
return;
|
|
125
|
+
document.getElementById(
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
128
|
+
contentRef.current?.getAttribute("aria-describedby")
|
|
129
|
+
) || console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
166
130
|
|
|
167
131
|
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.
|
|
168
132
|
|
|
169
133
|
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.
|
|
170
134
|
|
|
171
135
|
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
return null;
|
|
176
|
-
};
|
|
177
|
-
const AlertDialogInner = (props) => {
|
|
178
|
-
const { __scopeAlertDialog, native, ...alertDialogProps } = props;
|
|
179
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
180
|
-
if (process.env.TAMAGUI_TARGET === "native") {
|
|
181
|
-
const [open, setOpen] = useControllableState({
|
|
182
|
-
prop: props.open,
|
|
183
|
-
defaultProp: props.defaultOpen || false,
|
|
184
|
-
onChange: props.onOpenChange,
|
|
185
|
-
transition: true
|
|
186
|
-
});
|
|
187
|
-
let triggerElement = null;
|
|
188
|
-
let title = "";
|
|
189
|
-
let description = "";
|
|
190
|
-
const buttons = [];
|
|
191
|
-
forEachChildDeep(React.Children.toArray(props.children), (child) => {
|
|
192
|
-
if (!React.isValidElement(child))
|
|
193
|
-
return false;
|
|
194
|
-
const name = isTamaguiElement(child) ? child.type.staticConfig.componentName : child.type["displayName"];
|
|
195
|
-
switch (name) {
|
|
196
|
-
case TRIGGER_NAME: {
|
|
197
|
-
triggerElement = React.cloneElement(child, {
|
|
198
|
-
__native: true
|
|
199
|
-
});
|
|
200
|
-
return false;
|
|
201
|
-
}
|
|
202
|
-
case TITLE_NAME: {
|
|
203
|
-
title = getStringChildren(child);
|
|
204
|
-
return false;
|
|
205
|
-
}
|
|
206
|
-
case DESCRIPTION_NAME: {
|
|
207
|
-
description = getStringChildren(child);
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
case ACTION_NAME:
|
|
211
|
-
case CANCEL_NAME: {
|
|
212
|
-
const style = name === ACTION_NAME ? "default" : "cancel";
|
|
213
|
-
const text = getStringChildren(child);
|
|
214
|
-
const onPress = () => {
|
|
215
|
-
const childProps = child.props;
|
|
216
|
-
childProps?.onPress?.({ native: true });
|
|
217
|
-
setOpen(false);
|
|
218
|
-
};
|
|
219
|
-
buttons.push({
|
|
220
|
-
style,
|
|
221
|
-
text,
|
|
222
|
-
// @ts-ignore
|
|
223
|
-
onPress
|
|
224
|
-
});
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
default: {
|
|
228
|
-
return true;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
useIsomorphicLayoutEffect(() => {
|
|
233
|
-
if (!open || !native)
|
|
234
|
-
return;
|
|
235
|
-
if (title || description) {
|
|
236
|
-
Alert.alert(title, description, buttons);
|
|
237
|
-
}
|
|
238
|
-
}, [native, open]);
|
|
239
|
-
if (native) {
|
|
240
|
-
return React.cloneElement(triggerElement, {
|
|
241
|
-
__onPress: () => {
|
|
242
|
-
setOpen(true);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
}
|
|
136
|
+
}, [contentRef]), null), AlertDialogInner = (props) => {
|
|
137
|
+
const { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
247
138
|
return <Dialog {...dialogScope} {...alertDialogProps} modal />;
|
|
248
139
|
};
|
|
249
|
-
function forEachChildDeep(children, onChild) {
|
|
250
|
-
for (const child of children) {
|
|
251
|
-
if (!React.isValidElement(child))
|
|
252
|
-
continue;
|
|
253
|
-
if (!onChild(child))
|
|
254
|
-
continue;
|
|
255
|
-
if (child.props.children) {
|
|
256
|
-
forEachChildDeep(React.Children.toArray(child.props.children), onChild);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
function getStringChildren(child) {
|
|
261
|
-
let string = "";
|
|
262
|
-
forEachChildDeep(React.Children.toArray(child), (child2) => {
|
|
263
|
-
if (typeof child2.props.children === "string") {
|
|
264
|
-
string = child2.props.children;
|
|
265
|
-
return false;
|
|
266
|
-
}
|
|
267
|
-
return true;
|
|
268
|
-
});
|
|
269
|
-
return string;
|
|
270
|
-
}
|
|
271
140
|
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
272
141
|
Trigger: AlertDialogTrigger,
|
|
273
142
|
Portal: AlertDialogPortal,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AlertDialog.tsx"],
|
|
4
|
-
"mappings": "AAGA,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAGA,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAgB,0BAA0B;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EAGA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEP,OAAqC;AACrC,YAAY,WAAW;AACvB,OAAsB;AAMtB,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,CAAC;AAAA,YACK;AAAA,QACJ,SAAS,qBAAqB,SAAS,SAAS;AAAA,MAClD;AAAA,IAEJ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