@tamagui/alert-dialog 2.1.0 → 2.2.0-1781071309197
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.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
2
|
-
import { isWeb
|
|
3
|
-
import { Slottable, View, createStyledContext,
|
|
2
|
+
import { isWeb } from "@tamagui/constants";
|
|
3
|
+
import { Slottable, View, createStyledContext, styled } from "@tamagui/core";
|
|
4
4
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@tamagui/dialog";
|
|
5
5
|
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
6
|
-
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
7
6
|
import * as React from "react";
|
|
8
|
-
import { Alert } from "react-native-web";
|
|
9
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
const getAlertDialogScope = scope => scope;
|
|
11
9
|
const ROOT_NAME = "AlertDialog";
|
|
@@ -184,9 +182,7 @@ const DescriptionWarning = ({
|
|
|
184
182
|
}) => {
|
|
185
183
|
if (process.env.NODE_ENV === "development") React.useEffect(() => {
|
|
186
184
|
if (!isWeb) return;
|
|
187
|
-
if (!document.getElementById(
|
|
188
|
-
// @ts-ignore
|
|
189
|
-
contentRef.current?.getAttribute("aria-describedby"))) console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
185
|
+
if (!document.getElementById(contentRef.current?.getAttribute("aria-describedby"))) console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
190
186
|
|
|
191
187
|
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.
|
|
192
188
|
|
|
@@ -208,14 +204,6 @@ const AlertDialogInner = props => {
|
|
|
208
204
|
modal: true
|
|
209
205
|
});
|
|
210
206
|
};
|
|
211
|
-
function forEachChildDeep(children, onChild) {
|
|
212
|
-
for (const child of children) {
|
|
213
|
-
if (!React.isValidElement(child)) continue;
|
|
214
|
-
if (!onChild(child)) continue;
|
|
215
|
-
const childProps = child.props;
|
|
216
|
-
if (childProps.children) forEachChildDeep(React.Children.toArray(childProps.children), onChild);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
207
|
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
220
208
|
Trigger: AlertDialogTrigger,
|
|
221
209
|
Portal: AlertDialogPortal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useComposedRefs","isWeb","useIsomorphicLayoutEffect","Slottable","View","createStyledContext","isTamaguiElement","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","useControllableState","React","Alert","jsx","jsxs","getAlertDialogScope","scope","ROOT_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","AlertDialogAction","AlertDialogAction2","actionProps","AlertDialogCancel","AlertDialogCancel2","cancelProps","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","useEffect","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","modal","forEachChildDeep","onChild","child","isValidElement","childProps","Children","toArray","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,EAAOC,yBAAA,QAAiC;AAEjD,SAAAC,SAAA,EAAAC,IAAA,EAAAC,mBAAA,EAAAC,gBAAA,EAAAC,MAAA;AAAA,SACEC,MAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,iBAAA,EAAAC,aAAA,EAAAC,kBAAA,EAAAC,YAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,qBAAA;AAAA,SACAC,oBAAA,EAAAC,oBAAA;AAAA,SACAC,oBAAA;AAAA,OACA,KAAAC,KAAA;AAAA,SACAC,KAAA;AAAA,SACKC,GAAA,EAAAC,IAAA;AAYP,MAAAC,mBAAA,GAAAC,KAAA,IAAAA,KAAA;AAAA,MACEC,SAAA;AAAA,MACAC,6BAAA,GAAArB,MAAA,CAAAH,IAAA;EAAAyB,IAAA;AAAA;AAAA,MACAC,kBAAA,GAAAF,6BAAA,CAAAG,SAAA,UAAAC,oBAAAC,KAAA,EAAAC,YAAA;EAAA,IACAD,KAAA;IACA;MAAAE,QAAA;MAAAC,OAAA;MAAAC,SAAA;MAAA,GAAAC;IAAA,IAAAL,KAAA;IACA,sBAAAV,GAAA,CAAAK,6BAAA;MACA,GAAAU,IAAA;MACAF,OAAA,EAAAlB,oBAAA,CAAAkB,OAAA,EAAAC,SAAA;IACA;EAAA;EACA,MACK;IAAAX,KAAA;IAAA,GAAAa;EAAA,IAAAN,KAAA;EACP,sBAASV,GAAA,CAAAP,aAAsB;IAC/BU,KAAA,EAASD,mBAAA,CAAAC,KAAA;IACT,GAAAa,YAAY;IACZC,GAAA,E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4B,KAAA,EACJzC,gBAAK;EAAA0C,WAAA,EAAAtC;AAAA;AACP6B,WAEJ,CAAAU,WAAA,GAAAhG,SAAA;AACF,SAAAsF,WAAA,EAAA1B,iBAAA,EAAAG,iBAAA,EAAAtC,kBAAA,EAAAgC,sBAAA,EAAAS,sBAAA,EAAAjD,kBAAA,EAAAH,iBAAA,EAAAuC,gBAAA,EAAAlD,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useComposedRefs","isWeb","Slottable","View","createStyledContext","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","React","jsx","jsxs","getAlertDialogScope","scope","ROOT_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","AlertDialogAction","AlertDialogAction2","actionProps","AlertDialogCancel","AlertDialogCancel2","cancelProps","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","useEffect","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","modal","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["AlertDialog.mjs"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport { Slottable, View, createStyledContext, styled } from \"@tamagui/core\";\nimport { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from \"@tamagui/dialog\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport * as React from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst getAlertDialogScope = (scope) => scope;\nconst ROOT_NAME = \"AlertDialog\";\nconst NativeAlertDialogTriggerFrame = styled(View, { name: \"AlertDialogTrigger\" });\nconst AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function AlertDialogTrigger2(props, forwardedRef) {\n\tif (props[\"__native\"]) {\n\t\tconst { __native, onPress, __onPress, ...rest } = props;\n\t\treturn /* @__PURE__ */ jsx(NativeAlertDialogTriggerFrame, {\n\t\t\t...rest,\n\t\t\tonPress: composeEventHandlers(onPress, __onPress)\n\t\t});\n\t}\n\tconst { scope, ...triggerProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTrigger, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...triggerProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogPortal = function AlertDialogPortal2(props) {\n\tconst { scope, ...portalProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogPortal, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...portalProps\n\t});\n};\nconst AlertDialogOverlay = styled(DialogOverlayFrame, { name: \"AlertDialogOverlay\" }).styleable(function AlertDialogOverlay2(props, forwardedRef) {\n\tconst { scope, ...overlayProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogOverlay, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...overlayProps,\n\t\tref: forwardedRef\n\t});\n});\nconst CONTENT_NAME = \"AlertDialogContent\";\nconst { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = createStyledContext({}, \"AlertDialogContext\");\nconst AlertDialogContent = React.forwardRef(function AlertDialogContent2(props, forwardedRef) {\n\tconst { scope, children, ...contentProps } = props;\n\tconst dialogScope = getAlertDialogScope(scope);\n\tconst contentRef = React.useRef(null);\n\tconst composedRefs = useComposedRefs(forwardedRef, contentRef);\n\tconst cancelRef = React.useRef(null);\n\treturn /* @__PURE__ */ jsx(DialogWarningProvider, {\n\t\tcontentName: CONTENT_NAME,\n\t\ttitleName: TITLE_NAME,\n\t\tdocsSlug: \"alert-dialog\",\n\t\tchildren: /* @__PURE__ */ jsx(AlertDialogContextProvider, {\n\t\t\tscope,\n\t\t\tcancelRef,\n\t\t\tdestructiveRef: React.useRef(null),\n\t\t\tchildren: /* @__PURE__ */ jsxs(DialogContent, {\n\t\t\t\trole: \"alertdialog\",\n\t\t\t\t\"aria-modal\": true,\n\t\t\t\tscope: dialogScope,\n\t\t\t\t...contentProps,\n\t\t\t\tref: composedRefs,\n\t\t\t\tonOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (isWeb) cancelRef.current?.focus({ preventScroll: true });\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: (event) => event.preventDefault(),\n\t\t\t\tonInteractOutside: (event) => event.preventDefault(),\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(Slottable, { children }), process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })]\n\t\t\t})\n\t\t})\n\t});\n});\nconst TITLE_NAME = \"AlertDialogTitle\";\nconst AlertDialogTitle = styled(View, { name: TITLE_NAME }).styleable(function AlertDialogTitle2(props, forwardedRef) {\n\tconst { scope, ...titleProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTitle, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...titleProps,\n\t\tref: forwardedRef\n\t});\n});\nconst DESCRIPTION_NAME = \"AlertDialogDescription\";\nconst AlertDialogDescription = styled(View, { name: DESCRIPTION_NAME }).styleable(function AlertDialogDescription2(props, forwardedRef) {\n\tconst { scope, ...descriptionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogDescription, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...descriptionProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogAction = styled(View, { name: \"AlertDialogAction\" }).styleable(function AlertDialogAction2(props, forwardedRef) {\n\tconst { scope, ...actionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...actionProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogCancel = styled(View, { name: \"AlertDialogCancel\" }).styleable(function AlertDialogCancel2(props, forwardedRef) {\n\tconst { scope, ...cancelProps } = props;\n\tconst { cancelRef } = useAlertDialogContentContext(scope);\n\tconst ref = useComposedRefs(forwardedRef, cancelRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...cancelProps,\n\t\tref\n\t});\n});\nconst AlertDialogDestructive = styled(View, { name: \"AlertDialogDestructive\" }).styleable(function AlertDialogDestructive2(props, forwardedRef) {\n\tconst { scope, ...destructiveProps } = props;\n\tconst { destructiveRef } = useAlertDialogContentContext(scope);\n\tconst ref = useComposedRefs(forwardedRef, destructiveRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...destructiveProps,\n\t\tref\n\t});\n});\nconst DescriptionWarning = ({ contentRef }) => {\n\tif (process.env.NODE_ENV === \"development\") React.useEffect(() => {\n\t\tif (!isWeb) return;\n\t\tif (!document.getElementById(contentRef.current?.getAttribute(\"aria-describedby\"))) 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\t}, [contentRef]);\n\treturn null;\n};\nconst AlertDialogInner = (props) => {\n\tconst { scope, native, ...alertDialogProps } = props;\n\treturn /* @__PURE__ */ jsx(Dialog, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...alertDialogProps,\n\t\tmodal: true\n\t});\n};\nconst AlertDialog = withStaticProperties(AlertDialogInner, {\n\tTrigger: AlertDialogTrigger,\n\tPortal: AlertDialogPortal,\n\tOverlay: AlertDialogOverlay,\n\tContent: AlertDialogContent,\n\tAction: AlertDialogAction,\n\tCancel: AlertDialogCancel,\n\tDestructive: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n\nexport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogDestructive, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,SAAS,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,MAAM,QAAQ,eAAe;AAC5E,SAASC,MAAM,EAAEC,WAAW,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,WAAW,EAAEC,aAAa,EAAEC,qBAAqB,QAAQ,iBAAiB;AAC3L,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,kBAAkB;AAC7E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAE7C,MAAMC,mBAAmB,GAAIC,KAAK,IAAKA,KAAK;AAC5C,MAAMC,SAA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AC;AACH,CAAC;AACD,MAAMC,WAAW,GAAGrF,oBAAoB,CAACiF,gBAAgB,EAAE;EAC1DK,OAAO,EAAE7E,kBAAkB;EAC3B8E,MAAM,EAAEnE,iBAAiB;EACzBoE,OAAO,EAAEjE,kBAAkB;EAC3BkE,OAAO,EAAE1D,kBAAkB;EAC3B2D,MAAM,EAAExB,iBAAiB;EACzByB,MAAM,EAAEtB,iBAAiB;EACzBuB,WAAW,EAAEpB,sBAAsB;EACnCqB,KAAK,EAAElC,gBAAgB;EACvBmC,WAAW,EAAE/B;AACd,CAAC,CAAC;AACFsB,WAAW,CAACU,WAAW,GAAGzF,SAAS;AAEnC,SAAS+E,WAAW,EAAEnB,iBAAiB,EAAEG,iBAAiB,EAAEtC,kBAAkB,EAAEgC,sBAAsB,EAAES,sBAAsB,EAAEjD,kBAAkB,EAAEH,iBAAiB,EAAEuC,gBAAgB,EAAElD,kBAAkB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
3
|
import { isWeb, useIsomorphicLayoutEffect } from "@tamagui/constants";
|
|
4
4
|
import { Slottable, View, createStyledContext, isTamaguiElement, styled } from "@tamagui/core";
|
|
@@ -23,7 +23,7 @@ var AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function AlertD
|
|
|
23
23
|
__onPress,
|
|
24
24
|
...rest
|
|
25
25
|
} = props;
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */jsx(NativeAlertDialogTriggerFrame, {
|
|
27
27
|
...rest,
|
|
28
28
|
onPress: composeEventHandlers(onPress, __onPress)
|
|
29
29
|
});
|
|
@@ -32,7 +32,7 @@ var AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function AlertD
|
|
|
32
32
|
scope,
|
|
33
33
|
...triggerProps
|
|
34
34
|
} = props;
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */jsx(DialogTrigger, {
|
|
36
36
|
scope: getAlertDialogScope(scope),
|
|
37
37
|
...triggerProps,
|
|
38
38
|
ref: forwardedRef
|
|
@@ -43,7 +43,7 @@ var AlertDialogPortal = function AlertDialogPortal2(props) {
|
|
|
43
43
|
scope,
|
|
44
44
|
...portalProps
|
|
45
45
|
} = props;
|
|
46
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */jsx(DialogPortal, {
|
|
47
47
|
scope: getAlertDialogScope(scope),
|
|
48
48
|
...portalProps
|
|
49
49
|
});
|
|
@@ -55,7 +55,7 @@ var AlertDialogOverlay = styled(DialogOverlayFrame, {
|
|
|
55
55
|
scope,
|
|
56
56
|
...overlayProps
|
|
57
57
|
} = props;
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */jsx(DialogOverlay, {
|
|
59
59
|
scope: getAlertDialogScope(scope),
|
|
60
60
|
...overlayProps,
|
|
61
61
|
ref: forwardedRef
|
|
@@ -76,15 +76,15 @@ var AlertDialogContent = /* @__PURE__ */React.forwardRef(function AlertDialogCon
|
|
|
76
76
|
var contentRef = React.useRef(null);
|
|
77
77
|
var composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
78
78
|
var cancelRef = React.useRef(null);
|
|
79
|
-
return /* @__PURE__ */
|
|
79
|
+
return /* @__PURE__ */jsx(DialogWarningProvider, {
|
|
80
80
|
contentName: CONTENT_NAME,
|
|
81
81
|
titleName: TITLE_NAME,
|
|
82
82
|
docsSlug: "alert-dialog",
|
|
83
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */jsx(AlertDialogContextProvider, {
|
|
84
84
|
scope,
|
|
85
85
|
cancelRef,
|
|
86
86
|
destructiveRef: React.useRef(null),
|
|
87
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */jsxs(DialogContent, {
|
|
88
88
|
role: "alertdialog",
|
|
89
89
|
"aria-modal": true,
|
|
90
90
|
scope: dialogScope,
|
|
@@ -105,9 +105,9 @@ var AlertDialogContent = /* @__PURE__ */React.forwardRef(function AlertDialogCon
|
|
|
105
105
|
onInteractOutside: function (event) {
|
|
106
106
|
return event.preventDefault();
|
|
107
107
|
},
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */jsx(Slottable, {
|
|
109
109
|
children
|
|
110
|
-
}), process.env.NODE_ENV === "development" && /* @__PURE__ */
|
|
110
|
+
}), process.env.NODE_ENV === "development" && /* @__PURE__ */jsx(DescriptionWarning, {
|
|
111
111
|
contentRef
|
|
112
112
|
})]
|
|
113
113
|
})
|
|
@@ -122,7 +122,7 @@ var AlertDialogTitle = styled(View, {
|
|
|
122
122
|
scope,
|
|
123
123
|
...titleProps
|
|
124
124
|
} = props;
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */jsx(DialogTitle, {
|
|
126
126
|
scope: getAlertDialogScope(scope),
|
|
127
127
|
...titleProps,
|
|
128
128
|
ref: forwardedRef
|
|
@@ -136,7 +136,7 @@ var AlertDialogDescription = styled(View, {
|
|
|
136
136
|
scope,
|
|
137
137
|
...descriptionProps
|
|
138
138
|
} = props;
|
|
139
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */jsx(DialogDescription, {
|
|
140
140
|
scope: getAlertDialogScope(scope),
|
|
141
141
|
...descriptionProps,
|
|
142
142
|
ref: forwardedRef
|
|
@@ -150,7 +150,7 @@ var AlertDialogAction = styled(View, {
|
|
|
150
150
|
scope,
|
|
151
151
|
...actionProps
|
|
152
152
|
} = props;
|
|
153
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
154
154
|
scope: getAlertDialogScope(scope),
|
|
155
155
|
...actionProps,
|
|
156
156
|
ref: forwardedRef
|
|
@@ -168,7 +168,7 @@ var AlertDialogCancel = styled(View, {
|
|
|
168
168
|
cancelRef
|
|
169
169
|
} = useAlertDialogContentContext(scope);
|
|
170
170
|
var ref = useComposedRefs(forwardedRef, cancelRef);
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
172
172
|
scope: getAlertDialogScope(scope),
|
|
173
173
|
...cancelProps,
|
|
174
174
|
ref
|
|
@@ -186,7 +186,7 @@ var AlertDialogDestructive = styled(View, {
|
|
|
186
186
|
destructiveRef
|
|
187
187
|
} = useAlertDialogContentContext(scope);
|
|
188
188
|
var ref = useComposedRefs(forwardedRef, destructiveRef);
|
|
189
|
-
return /* @__PURE__ */
|
|
189
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
190
190
|
scope: getAlertDialogScope(scope),
|
|
191
191
|
...destructiveProps,
|
|
192
192
|
ref
|
|
@@ -273,7 +273,7 @@ var AlertDialogInner = function (props) {
|
|
|
273
273
|
setOpen(true);
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */jsx(Dialog, {
|
|
277
277
|
scope: dialogScope,
|
|
278
278
|
...alertDialogProps,
|
|
279
279
|
modal: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["jsx","_jsx","jsxs","_jsxs","useComposedRefs","isWeb","useIsomorphicLayoutEffect","Slottable","View","createStyledContext","isTamaguiElement","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","useControllableState","React","Alert","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","_cancelRef_current","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","ACTION_NAME","AlertDialogAction","AlertDialogAction2","actionProps","CANCEL_NAME","AlertDialogCancel","AlertDialogCancel2","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","param","useEffect","_contentRef_current","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","open","setOpen","prop","defaultProp","defaultOpen","onChange","onOpenChange","transition","triggerElement","title","description","buttons","forEachChildDeep","Children","toArray","child","isValidElement","type","staticConfig","componentName","cloneElement","getStringChildren","style","text","_childProps_onPress","childProps","call","push","alert","modal","onChild","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","value","err","return","string","child2","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAuB;AAChC,SAASC,eAAO,+BAAiC;AAEjD,SAAAC,KAAA,EAAAC,yBAAA;AAAA,SACEC,SAAA,EAAAC,IAAA,EAAAC,mBAAA,EAAAC,gBAAA,EAAAC,MAAA;AAAA,SACAC,MAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,iBAAA,EAAAC,aAAA,EAAAC,kBAAA,EAAAC,YAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,qBAAA;AAAA,SACAC,oBAAA,EAAAC,oBAAA;AAAA,SACAC,oBAAA;AAAA,OACA,K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|
|
1
|
+
{"version":3,"names":["jsx","jsxs","useComposedRefs","isWeb","useIsomorphicLayoutEffect","Slottable","View","createStyledContext","isTamaguiElement","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","useControllableState","React","Alert","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","_cancelRef_current","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","ACTION_NAME","AlertDialogAction","AlertDialogAction2","actionProps","CANCEL_NAME","AlertDialogCancel","AlertDialogCancel2","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","param","useEffect","_contentRef_current","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","open","setOpen","prop","defaultProp","defaultOpen","onChange","onOpenChange","transition","triggerElement","title","description","buttons","forEachChildDeep","Children","toArray","child","isValidElement","type","staticConfig","componentName","cloneElement","getStringChildren","style","text","_childProps_onPress","childProps","call","push","alert","modal","onChild","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","value","err","return","string","child2","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["AlertDialog.native.js"],"sourcesContent":["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { Slottable, View, createStyledContext, isTamaguiElement, styled } from \"@tamagui/core\";\nimport { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from \"@tamagui/dialog\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { Alert } from \"react-native\";\n\nvar getAlertDialogScope = function(scope) {\n\treturn scope;\n};\nvar ROOT_NAME = \"AlertDialog\";\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar NativeAlertDialogTriggerFrame = styled(View, { name: TRIGGER_NAME });\nvar AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function AlertDialogTrigger2(props, forwardedRef) {\n\tif (props[\"__native\"]) {\n\t\tvar { __native, onPress, __onPress, ...rest } = props;\n\t\treturn /* @__PURE__ */ jsx(NativeAlertDialogTriggerFrame, {\n\t\t\t...rest,\n\t\t\tonPress: composeEventHandlers(onPress, __onPress)\n\t\t});\n\t}\n\tvar { scope, ...triggerProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTrigger, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...triggerProps,\n\t\tref: forwardedRef\n\t});\n});\nvar AlertDialogPortal = function AlertDialogPortal2(props) {\n\tvar { scope, ...portalProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogPortal, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...portalProps\n\t});\n};\nvar AlertDialogOverlay = styled(DialogOverlayFrame, { name: \"AlertDialogOverlay\" }).styleable(function AlertDialogOverlay2(props, forwardedRef) {\n\tvar { scope, ...overlayProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogOverlay, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...overlayProps,\n\t\tref: forwardedRef\n\t});\n});\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = createStyledContext({}, \"AlertDialogContext\");\nvar AlertDialogContent = /* @__PURE__ */ React.forwardRef(function AlertDialogContent2(props, forwardedRef) {\n\tvar { scope, children, ...contentProps } = props;\n\tvar dialogScope = getAlertDialogScope(scope);\n\tvar contentRef = React.useRef(null);\n\tvar composedRefs = useComposedRefs(forwardedRef, contentRef);\n\tvar cancelRef = React.useRef(null);\n\treturn /* @__PURE__ */ jsx(DialogWarningProvider, {\n\t\tcontentName: CONTENT_NAME,\n\t\ttitleName: TITLE_NAME,\n\t\tdocsSlug: \"alert-dialog\",\n\t\tchildren: /* @__PURE__ */ jsx(AlertDialogContextProvider, {\n\t\t\tscope,\n\t\t\tcancelRef,\n\t\t\tdestructiveRef: React.useRef(null),\n\t\t\tchildren: /* @__PURE__ */ jsxs(DialogContent, {\n\t\t\t\trole: \"alertdialog\",\n\t\t\t\t\"aria-modal\": true,\n\t\t\t\tscope: dialogScope,\n\t\t\t\t...contentProps,\n\t\t\t\tref: composedRefs,\n\t\t\t\tonOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, function(event) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (isWeb) {\n\t\t\t\t\t\tvar _cancelRef_current;\n\t\t\t\t\t\t(_cancelRef_current = cancelRef.current) === null || _cancelRef_current === void 0 || _cancelRef_current.focus({ preventScroll: true });\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: function(event) {\n\t\t\t\t\treturn event.preventDefault();\n\t\t\t\t},\n\t\t\t\tonInteractOutside: function(event) {\n\t\t\t\t\treturn event.preventDefault();\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(Slottable, { children }), process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })]\n\t\t\t})\n\t\t})\n\t});\n});\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = styled(View, { name: TITLE_NAME }).styleable(function AlertDialogTitle2(props, forwardedRef) {\n\tvar { scope, ...titleProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTitle, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...titleProps,\n\t\tref: forwardedRef\n\t});\n});\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = styled(View, { name: DESCRIPTION_NAME }).styleable(function AlertDialogDescription2(props, forwardedRef) {\n\tvar { scope, ...descriptionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogDescription, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...descriptionProps,\n\t\tref: forwardedRef\n\t});\n});\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = styled(View, { name: ACTION_NAME }).styleable(function AlertDialogAction2(props, forwardedRef) {\n\tvar { scope, ...actionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...actionProps,\n\t\tref: forwardedRef\n\t});\n});\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = styled(View, { name: CANCEL_NAME }).styleable(function AlertDialogCancel2(props, forwardedRef) {\n\tvar { scope, ...cancelProps } = props;\n\tvar { cancelRef } = useAlertDialogContentContext(scope);\n\tvar ref = useComposedRefs(forwardedRef, cancelRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...cancelProps,\n\t\tref\n\t});\n});\nvar DESTRUCTIVE_NAME = \"AlertDialogDestructive\";\nvar AlertDialogDestructive = styled(View, { name: DESTRUCTIVE_NAME }).styleable(function AlertDialogDestructive2(props, forwardedRef) {\n\tvar { scope, ...destructiveProps } = props;\n\tvar { destructiveRef } = useAlertDialogContentContext(scope);\n\tvar ref = useComposedRefs(forwardedRef, destructiveRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...destructiveProps,\n\t\tref\n\t});\n});\nvar DescriptionWarning = function(param) {\n\tvar { contentRef } = param;\n\tif (process.env.NODE_ENV === \"development\") React.useEffect(function() {\n\t\tvar _contentRef_current;\n\t\tif (!isWeb) return;\n\t\tif (!document.getElementById((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.getAttribute(\"aria-describedby\"))) 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\t}, [contentRef]);\n\treturn null;\n};\nvar AlertDialogInner = function(props) {\n\tvar { scope, native, ...alertDialogProps } = props;\n\tvar dialogScope = getAlertDialogScope(scope);\n\tvar [open, setOpen] = useControllableState({\n\t\tprop: props.open,\n\t\tdefaultProp: props.defaultOpen || false,\n\t\tonChange: props.onOpenChange,\n\t\ttransition: true\n\t});\n\tvar triggerElement = null;\n\tvar title = \"\";\n\tvar description = \"\";\n\tvar buttons = [];\n\tforEachChildDeep(React.Children.toArray(props.children), function(child) {\n\t\tif (!/* @__PURE__ */ React.isValidElement(child)) return false;\n\t\tvar name = isTamaguiElement(child) ? child.type.staticConfig.componentName : child.type[\"displayName\"];\n\t\tswitch (name) {\n\t\t\tcase TRIGGER_NAME:\n\t\t\t\ttriggerElement = /* @__PURE__ */ React.cloneElement(child, { __native: true });\n\t\t\t\treturn false;\n\t\t\tcase TITLE_NAME:\n\t\t\t\ttitle = getStringChildren(child);\n\t\t\t\treturn false;\n\t\t\tcase DESCRIPTION_NAME:\n\t\t\t\tdescription = getStringChildren(child);\n\t\t\t\treturn false;\n\t\t\tcase ACTION_NAME:\n\t\t\tcase DESTRUCTIVE_NAME:\n\t\t\tcase CANCEL_NAME:\n\t\t\t\tvar style = name === ACTION_NAME ? \"default\" : name === DESTRUCTIVE_NAME ? \"destructive\" : \"cancel\";\n\t\t\t\tvar text = getStringChildren(child);\n\t\t\t\tvar onPress = function() {\n\t\t\t\t\tvar _childProps_onPress;\n\t\t\t\t\tvar childProps = child.props;\n\t\t\t\t\tchildProps === null || childProps === void 0 || (_childProps_onPress = childProps.onPress) == null || _childProps_onPress.call(childProps, { native: true });\n\t\t\t\t\tsetOpen(false);\n\t\t\t\t};\n\t\t\t\tbuttons.push({\n\t\t\t\t\tstyle,\n\t\t\t\t\ttext,\n\t\t\t\t\tonPress\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\tdefault: return true;\n\t\t}\n\t});\n\tuseIsomorphicLayoutEffect(function() {\n\t\tif (!open || !native) return;\n\t\tif (title || description) Alert.alert(title, description, buttons);\n\t}, [native, open]);\n\tif (native) return /* @__PURE__ */ React.cloneElement(triggerElement, { __onPress: function() {\n\t\tsetOpen(true);\n\t} });\n\treturn /* @__PURE__ */ jsx(Dialog, {\n\t\tscope: dialogScope,\n\t\t...alertDialogProps,\n\t\tmodal: true\n\t});\n};\nfunction forEachChildDeep(children, onChild) {\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar child = _step.value;\n\t\t\tif (!/* @__PURE__ */ React.isValidElement(child)) continue;\n\t\t\tif (!onChild(child)) continue;\n\t\t\tvar childProps = child.props;\n\t\t\tif (childProps.children) forEachChildDeep(React.Children.toArray(childProps.children), onChild);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nfunction getStringChildren(child) {\n\tvar string = \"\";\n\tforEachChildDeep(React.Children.toArray(child), function(child2) {\n\t\tif (typeof child2.props.children === \"string\") {\n\t\t\tstring = child2.props.children;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\treturn string;\n}\nvar AlertDialog = withStaticProperties(AlertDialogInner, {\n\tTrigger: AlertDialogTrigger,\n\tPortal: AlertDialogPortal,\n\tOverlay: AlertDialogOverlay,\n\tContent: AlertDialogContent,\n\tAction: AlertDialogAction,\n\tCancel: AlertDialogCancel,\n\tDestructive: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n\nexport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogDestructive, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };"],"mappings":"AAAA,SAASA,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAC7C,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,EAAEC,yBAAyB,QAAQ,oBAAoB;AACrE,SAASC,SAAS,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,MAAM,QAAQ,eAAe;AAC9F,SAASC,MAAM,EAAEC,WAAW,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,WAAW,EAAEC,aAAa,EAAEC,qBAAqB,QAAQ,iBAAiB;AAC3L,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,kBAAkB;AAC7E,SAASC,oB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AEwC,gBAAgB,EAAEnD,kBAAkB","ignoreList":[]}
|
package/dist/jsx/AlertDialog.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
2
|
-
import { isWeb
|
|
3
|
-
import { Slottable, View, createStyledContext,
|
|
2
|
+
import { isWeb } from "@tamagui/constants";
|
|
3
|
+
import { Slottable, View, createStyledContext, styled } from "@tamagui/core";
|
|
4
4
|
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@tamagui/dialog";
|
|
5
5
|
import { composeEventHandlers, withStaticProperties } from "@tamagui/helpers";
|
|
6
|
-
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
7
6
|
import * as React from "react";
|
|
8
|
-
import { Alert } from "react-native-web";
|
|
9
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
const getAlertDialogScope = scope => scope;
|
|
11
9
|
const ROOT_NAME = "AlertDialog";
|
|
@@ -184,9 +182,7 @@ const DescriptionWarning = ({
|
|
|
184
182
|
}) => {
|
|
185
183
|
if (process.env.NODE_ENV === "development") React.useEffect(() => {
|
|
186
184
|
if (!isWeb) return;
|
|
187
|
-
if (!document.getElementById(
|
|
188
|
-
// @ts-ignore
|
|
189
|
-
contentRef.current?.getAttribute("aria-describedby"))) console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
185
|
+
if (!document.getElementById(contentRef.current?.getAttribute("aria-describedby"))) console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
190
186
|
|
|
191
187
|
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.
|
|
192
188
|
|
|
@@ -208,14 +204,6 @@ const AlertDialogInner = props => {
|
|
|
208
204
|
modal: true
|
|
209
205
|
});
|
|
210
206
|
};
|
|
211
|
-
function forEachChildDeep(children, onChild) {
|
|
212
|
-
for (const child of children) {
|
|
213
|
-
if (!React.isValidElement(child)) continue;
|
|
214
|
-
if (!onChild(child)) continue;
|
|
215
|
-
const childProps = child.props;
|
|
216
|
-
if (childProps.children) forEachChildDeep(React.Children.toArray(childProps.children), onChild);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
207
|
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
220
208
|
Trigger: AlertDialogTrigger,
|
|
221
209
|
Portal: AlertDialogPortal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useComposedRefs","isWeb","useIsomorphicLayoutEffect","Slottable","View","createStyledContext","isTamaguiElement","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","useControllableState","React","Alert","jsx","jsxs","getAlertDialogScope","scope","ROOT_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","AlertDialogAction","AlertDialogAction2","actionProps","AlertDialogCancel","AlertDialogCancel2","cancelProps","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","useEffect","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","modal","forEachChildDeep","onChild","child","isValidElement","childProps","Children","toArray","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,EAAOC,yBAAA,QAAiC;AAEjD,SAAAC,SAAA,EAAAC,IAAA,EAAAC,mBAAA,EAAAC,gBAAA,EAAAC,MAAA;AAAA,SACEC,MAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,iBAAA,EAAAC,aAAA,EAAAC,kBAAA,EAAAC,YAAA,EAAAC,WAAA,EAAAC,aAAA,EAAAC,qBAAA;AAAA,SACAC,oBAAA,EAAAC,oBAAA;AAAA,SACAC,oBAAA;AAAA,OACA,KAAAC,KAAA;AAAA,SACAC,KAAA;AAAA,SACKC,GAAA,EAAAC,IAAA;AAYP,MAAAC,mBAAA,GAAAC,KAAA,IAAAA,KAAA;AAAA,MACEC,SAAA;AAAA,MACAC,6BAAA,GAAArB,MAAA,CAAAH,IAAA;EAAAyB,IAAA;AAAA;AAAA,MACAC,kBAAA,GAAAF,6BAAA,CAAAG,SAAA,UAAAC,oBAAAC,KAAA,EAAAC,YAAA;EAAA,IACAD,KAAA;IACA;MAAAE,QAAA;MAAAC,OAAA;MAAAC,SAAA;MAAA,GAAAC;IAAA,IAAAL,KAAA;IACA,sBAAAV,GAAA,CAAAK,6BAAA;MACA,GAAAU,IAAA;MACAF,OAAA,EAAAlB,oBAAA,CAAAkB,OAAA,EAAAC,SAAA;IACA;EAAA;EACA,MACK;IAAAX,KAAA;IAAA,GAAAa;EAAA,IAAAN,KAAA;EACP,sBAASV,GAAA,CAAAP,aAAsB;IAC/BU,KAAA,EAASD,mBAAA,CAAAC,KAAA;IACT,GAAAa,YAAY;IACZC,GAAA,EAAAN;EAoCU;AAlCV;AAMA,MAAMO,iBAAY,YAAAC,mBAAAT,KAAA;EAclB,MAAM;I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AAA,GAAAhG,SAAA;AACF,SAAAsF,WAAA,EAAA1B,iBAAA,EAAAG,iBAAA,EAAAtC,kBAAA,EAAAgC,sBAAA,EAAAS,sBAAA,EAAAjD,kBAAA,EAAAH,iBAAA,EAAAuC,gBAAA,EAAAlD,kBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useComposedRefs","isWeb","Slottable","View","createStyledContext","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","React","jsx","jsxs","getAlertDialogScope","scope","ROOT_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","AlertDialogPortal2","portalProps","AlertDialogOverlay","AlertDialogOverlay2","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","contentName","titleName","TITLE_NAME","docsSlug","destructiveRef","role","onOpenAutoFocus","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle","AlertDialogTitle2","titleProps","DESCRIPTION_NAME","AlertDialogDescription","AlertDialogDescription2","descriptionProps","AlertDialogAction","AlertDialogAction2","actionProps","AlertDialogCancel","AlertDialogCancel2","cancelProps","AlertDialogDestructive","AlertDialogDestructive2","destructiveProps","useEffect","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","modal","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["AlertDialog.mjs"],"sourcesContent":["import { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\nimport { Slottable, View, createStyledContext, styled } from \"@tamagui/core\";\nimport { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from \"@tamagui/dialog\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport * as React from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst getAlertDialogScope = (scope) => scope;\nconst ROOT_NAME = \"AlertDialog\";\nconst NativeAlertDialogTriggerFrame = styled(View, { name: \"AlertDialogTrigger\" });\nconst AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function AlertDialogTrigger2(props, forwardedRef) {\n\tif (props[\"__native\"]) {\n\t\tconst { __native, onPress, __onPress, ...rest } = props;\n\t\treturn /* @__PURE__ */ jsx(NativeAlertDialogTriggerFrame, {\n\t\t\t...rest,\n\t\t\tonPress: composeEventHandlers(onPress, __onPress)\n\t\t});\n\t}\n\tconst { scope, ...triggerProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTrigger, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...triggerProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogPortal = function AlertDialogPortal2(props) {\n\tconst { scope, ...portalProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogPortal, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...portalProps\n\t});\n};\nconst AlertDialogOverlay = styled(DialogOverlayFrame, { name: \"AlertDialogOverlay\" }).styleable(function AlertDialogOverlay2(props, forwardedRef) {\n\tconst { scope, ...overlayProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogOverlay, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...overlayProps,\n\t\tref: forwardedRef\n\t});\n});\nconst CONTENT_NAME = \"AlertDialogContent\";\nconst { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = createStyledContext({}, \"AlertDialogContext\");\nconst AlertDialogContent = React.forwardRef(function AlertDialogContent2(props, forwardedRef) {\n\tconst { scope, children, ...contentProps } = props;\n\tconst dialogScope = getAlertDialogScope(scope);\n\tconst contentRef = React.useRef(null);\n\tconst composedRefs = useComposedRefs(forwardedRef, contentRef);\n\tconst cancelRef = React.useRef(null);\n\treturn /* @__PURE__ */ jsx(DialogWarningProvider, {\n\t\tcontentName: CONTENT_NAME,\n\t\ttitleName: TITLE_NAME,\n\t\tdocsSlug: \"alert-dialog\",\n\t\tchildren: /* @__PURE__ */ jsx(AlertDialogContextProvider, {\n\t\t\tscope,\n\t\t\tcancelRef,\n\t\t\tdestructiveRef: React.useRef(null),\n\t\t\tchildren: /* @__PURE__ */ jsxs(DialogContent, {\n\t\t\t\trole: \"alertdialog\",\n\t\t\t\t\"aria-modal\": true,\n\t\t\t\tscope: dialogScope,\n\t\t\t\t...contentProps,\n\t\t\t\tref: composedRefs,\n\t\t\t\tonOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (isWeb) cancelRef.current?.focus({ preventScroll: true });\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: (event) => event.preventDefault(),\n\t\t\t\tonInteractOutside: (event) => event.preventDefault(),\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(Slottable, { children }), process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })]\n\t\t\t})\n\t\t})\n\t});\n});\nconst TITLE_NAME = \"AlertDialogTitle\";\nconst AlertDialogTitle = styled(View, { name: TITLE_NAME }).styleable(function AlertDialogTitle2(props, forwardedRef) {\n\tconst { scope, ...titleProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogTitle, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...titleProps,\n\t\tref: forwardedRef\n\t});\n});\nconst DESCRIPTION_NAME = \"AlertDialogDescription\";\nconst AlertDialogDescription = styled(View, { name: DESCRIPTION_NAME }).styleable(function AlertDialogDescription2(props, forwardedRef) {\n\tconst { scope, ...descriptionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogDescription, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...descriptionProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogAction = styled(View, { name: \"AlertDialogAction\" }).styleable(function AlertDialogAction2(props, forwardedRef) {\n\tconst { scope, ...actionProps } = props;\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...actionProps,\n\t\tref: forwardedRef\n\t});\n});\nconst AlertDialogCancel = styled(View, { name: \"AlertDialogCancel\" }).styleable(function AlertDialogCancel2(props, forwardedRef) {\n\tconst { scope, ...cancelProps } = props;\n\tconst { cancelRef } = useAlertDialogContentContext(scope);\n\tconst ref = useComposedRefs(forwardedRef, cancelRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...cancelProps,\n\t\tref\n\t});\n});\nconst AlertDialogDestructive = styled(View, { name: \"AlertDialogDestructive\" }).styleable(function AlertDialogDestructive2(props, forwardedRef) {\n\tconst { scope, ...destructiveProps } = props;\n\tconst { destructiveRef } = useAlertDialogContentContext(scope);\n\tconst ref = useComposedRefs(forwardedRef, destructiveRef);\n\treturn /* @__PURE__ */ jsx(DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...destructiveProps,\n\t\tref\n\t});\n});\nconst DescriptionWarning = ({ contentRef }) => {\n\tif (process.env.NODE_ENV === \"development\") React.useEffect(() => {\n\t\tif (!isWeb) return;\n\t\tif (!document.getElementById(contentRef.current?.getAttribute(\"aria-describedby\"))) 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\t}, [contentRef]);\n\treturn null;\n};\nconst AlertDialogInner = (props) => {\n\tconst { scope, native, ...alertDialogProps } = props;\n\treturn /* @__PURE__ */ jsx(Dialog, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...alertDialogProps,\n\t\tmodal: true\n\t});\n};\nconst AlertDialog = withStaticProperties(AlertDialogInner, {\n\tTrigger: AlertDialogTrigger,\n\tPortal: AlertDialogPortal,\n\tOverlay: AlertDialogOverlay,\n\tContent: AlertDialogContent,\n\tAction: AlertDialogAction,\n\tCancel: AlertDialogCancel,\n\tDestructive: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n\nexport { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogDestructive, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,SAAS,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,MAAM,QAAQ,eAAe;AAC5E,SAASC,MAAM,EAAEC,WAAW,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,WAAW,EAAEC,aAAa,EAAEC,qBAAqB,QAAQ,iBAAiB;AAC3L,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,kBAAkB;AAC7E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAE7C,MAAMC,mBAAmB,GAAIC,KAAK,IAAKA,KAAK;AAC5C,MAAMC,SAAS,GAAG,aAAa;AAC/B,MAAMC,6BAA6B,GAAGnB,MAAM,CAACF,IAAI,EAAE;EAAEs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DK,OAAO,EAAE7E,kBAAkB;EAC3B8E,MAAM,EAAEnE,iBAAiB;EACzBoE,OAAO,EAAEjE,kBAAkB;EAC3BkE,OAAO,EAAE1D,kBAAkB;EAC3B2D,MAAM,EAAExB,iBAAiB;EACzByB,MAAM,EAAEtB,iBAAiB;EACzBuB,WAAW,EAAEpB,sBAAsB;EACnCqB,KAAK,EAAElC,gBAAgB;EACvBmC,WAAW,EAAE/B;AACd,CAAC,CAAC;AACFsB,WAAW,CAACU,WAAW,GAAGzF,SAAS;AAEnC,SAAS+E,WAAW,EAAEnB,iBAAiB,EAAEG,iBAAiB,EAAEtC,kBAAkB,EAAEgC,sBAAsB,EAAES,sBAAsB,EAAEjD,kBAAkB,EAAEH,iBAAiB,EAAEuC,gBAAgB,EAAElD,kBAAkB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/alert-dialog",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-1781071309197",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"type": "module",
|
|
11
|
-
"sideEffects":
|
|
12
|
-
"*.css"
|
|
13
|
-
],
|
|
11
|
+
"sideEffects": false,
|
|
14
12
|
"main": "dist/cjs",
|
|
15
13
|
"module": "dist/esm",
|
|
16
14
|
"types": "./types/index.d.ts",
|
|
@@ -36,24 +34,24 @@
|
|
|
36
34
|
"clean:build": "tamagui-build clean:build"
|
|
37
35
|
},
|
|
38
36
|
"dependencies": {
|
|
39
|
-
"@tamagui/animate-presence": "2.
|
|
40
|
-
"@tamagui/compose-refs": "2.
|
|
41
|
-
"@tamagui/constants": "2.
|
|
42
|
-
"@tamagui/core": "2.
|
|
43
|
-
"@tamagui/create-context": "2.
|
|
44
|
-
"@tamagui/dialog": "2.
|
|
45
|
-
"@tamagui/dismissable": "2.
|
|
46
|
-
"@tamagui/focus-scope": "2.
|
|
47
|
-
"@tamagui/helpers": "2.
|
|
48
|
-
"@tamagui/polyfill-dev": "2.
|
|
49
|
-
"@tamagui/portal": "2.
|
|
50
|
-
"@tamagui/remove-scroll": "2.
|
|
51
|
-
"@tamagui/stacks": "2.
|
|
52
|
-
"@tamagui/text": "2.
|
|
53
|
-
"@tamagui/use-controllable-state": "2.
|
|
37
|
+
"@tamagui/animate-presence": "2.2.0-1781071309197",
|
|
38
|
+
"@tamagui/compose-refs": "2.2.0-1781071309197",
|
|
39
|
+
"@tamagui/constants": "2.2.0-1781071309197",
|
|
40
|
+
"@tamagui/core": "2.2.0-1781071309197",
|
|
41
|
+
"@tamagui/create-context": "2.2.0-1781071309197",
|
|
42
|
+
"@tamagui/dialog": "2.2.0-1781071309197",
|
|
43
|
+
"@tamagui/dismissable": "2.2.0-1781071309197",
|
|
44
|
+
"@tamagui/focus-scope": "2.2.0-1781071309197",
|
|
45
|
+
"@tamagui/helpers": "2.2.0-1781071309197",
|
|
46
|
+
"@tamagui/polyfill-dev": "2.2.0-1781071309197",
|
|
47
|
+
"@tamagui/portal": "2.2.0-1781071309197",
|
|
48
|
+
"@tamagui/remove-scroll": "2.2.0-1781071309197",
|
|
49
|
+
"@tamagui/stacks": "2.2.0-1781071309197",
|
|
50
|
+
"@tamagui/text": "2.2.0-1781071309197",
|
|
51
|
+
"@tamagui/use-controllable-state": "2.2.0-1781071309197"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
56
|
-
"@tamagui/build": "2.
|
|
54
|
+
"@tamagui/build": "2.2.0-1781071309197",
|
|
57
55
|
"react": ">=19",
|
|
58
56
|
"react-native": "0.83.2"
|
|
59
57
|
},
|