@tamagui/alert-dialog 2.7.7 → 3.0.0-beta.643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AlertDialog.cjs +173 -230
- package/dist/cjs/AlertDialog.native.cjs +309 -0
- package/dist/cjs/AlertDialog.native.js +255 -322
- package/dist/cjs/AlertDialog.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/AlertDialog.mjs +138 -187
- package/dist/esm/AlertDialog.mjs.map +1 -1
- package/dist/esm/AlertDialog.native.js +227 -289
- package/dist/esm/AlertDialog.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/jsx/AlertDialog.mjs +138 -187
- package/dist/jsx/AlertDialog.mjs.map +1 -1
- package/dist/jsx/AlertDialog.native.cjs +309 -0
- package/dist/jsx/AlertDialog.native.js +255 -322
- package/dist/jsx/AlertDialog.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +21 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +20 -19
- package/src/AlertDialog.tsx +106 -75
- package/types/AlertDialog.d.ts +40 -74
- package/types/AlertDialog.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","AlertDialog_exports","__export","AlertDialog","AlertDialogAction","AlertDialogCancel","AlertDialogContent","AlertDialogDescription","AlertDialogDestructive","AlertDialogOverlay","AlertDialogPortal","AlertDialogTitle","AlertDialogTrigger","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_dialog","import_helpers","import_use_controllable_state","React","__toESM","import_react_native","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","styled","View","name","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","jsx","composeEventHandlers","triggerProps","DialogTrigger","ref","AlertDialogPortal2","portalProps","DialogPortal","DialogOverlayFrame","AlertDialogOverlay2","overlayProps","DialogOverlay","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","createStyledContext","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","useComposedRefs","cancelRef","destructiveRef","DialogWarningProvider","contentName","titleName","TITLE_NAME","docsSlug","jsxs","DialogContent","role","onOpenAutoFocus","event","preventDefault","isWeb","_cancelRef_current","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","Slottable","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle2","titleProps","DialogTitle","DESCRIPTION_NAME","AlertDialogDescription2","descriptionProps","DialogDescription","ACTION_NAME","AlertDialogAction2","actionProps","DialogClose","CANCEL_NAME","AlertDialogCancel2","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructive2","destructiveProps","param","useEffect","_contentRef_current","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","open","setOpen","useControllableState","prop","defaultProp","defaultOpen","onChange","onOpenChange","transition","triggerElement","title","description","buttons","forEachChildDeep","Children","toArray","child","isValidElement","isTamaguiElement","type","staticConfig","componentName","cloneElement","getStringChildren","style","text","_childProps_onPress","childProps","call","push","useIsomorphicLayoutEffect","Alert","alert","Dialog","modal","onChild","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","err","return","string","child2","withStaticProperties","Trigger","Portal","Overlay","Content","Action","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,CAAAO,MAAA,UAAAP,SAAA,CAAAO,MAAA;IAAA,UACX;MACD,IAAAT,iBAAO,QAAAC,cAAA;IAAA;EACT;AAEE;AACA,SAAAf,iBAAOA,CAAAP,KAAA;EAAA,IAAA+B,MACT;EAAAlC,gBACK,CAAAhH,KAAA,CAAAiH,QAAkB,CAAAC,OAAA,CAAAC,KAAA,aAAAgC,MAAA;IACrB,WAAAA,MAAA,CAAAtI,KAAc,CAAA0B,QAAA,aAAuB;MACrC2G,MAAA,GAAAC,MAAO,CAAAtI,KAAA,CAAA0B,QAAA;MAAA,OACT;IAAA;IACK,OACL,IAAK;EAAA;EAEH,OAAA2G,MAAA;AAMA;AACA,IAAAtK,WAAA,GAAM,IAAAkB,cAAgB,CAAAsJ,oBAAA,EAAApD,gBAAA;EACpBqD,OAAA,EAAAhK,kBAAM;EACNiK,MAAA,EAAAnK,iBAAY;EACZoK,OAAA,EAAArK,kBAAa;EAAAsK,OAAA,EACfzK,kBAAA;EACA0K,MAAA,EAAA5K,iBAAa;EAAA6K,MAAA,EAAA5K,iBACX;EAAA6K,WACA,EAAA1K,sBAAA;EAAA2K,KAAA,EAAAxK,gBAAA;EAAAyK,WAEA,EAAA7K;AAAA;AAEFJ,WAAA,CAAAkL,WAAO,GAAAzJ,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["cjs/AlertDialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AlertDialog_exports = {};\n__export(AlertDialog_exports, {\n\tAlertDialog: () => AlertDialog,\n\tAlertDialogAction: () => AlertDialogAction,\n\tAlertDialogCancel: () => AlertDialogCancel,\n\tAlertDialogContent: () => AlertDialogContent,\n\tAlertDialogDescription: () => AlertDialogDescription,\n\tAlertDialogDestructive: () => AlertDialogDestructive,\n\tAlertDialogOverlay: () => AlertDialogOverlay,\n\tAlertDialogPortal: () => AlertDialogPortal,\n\tAlertDialogTitle: () => AlertDialogTitle,\n\tAlertDialogTrigger: () => AlertDialogTrigger\n});\nmodule.exports = __toCommonJS(AlertDialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core2 = require(\"@tamagui/core\");\nvar import_dialog = require(\"@tamagui/dialog\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar React = __toESM(require(\"react\"), 1);\nvar import_react_native = require(\"react-native\");\nvar getAlertDialogScope = function(scope) {\n\treturn scope;\n};\nvar ROOT_NAME = \"AlertDialog\";\nvar ALERT_DIALOG_PART = /* @__PURE__ */ Symbol(\"AlertDialogPart\");\nvar markAlertDialogPart = function(component, part) {\n\tObject.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part });\n};\nvar NativeAlertDialogTriggerFrame = (0, import_core2.styled)(import_core2.View, { displayName: \"AlertDialogTrigger\" });\nmarkAlertDialogPart(NativeAlertDialogTriggerFrame, \"trigger\");\nvar AlertDialogTrigger = (0, import_core.createStyledHOC)(NativeAlertDialogTriggerFrame, function AlertDialogTrigger2(props, forwardedRef) {\n\tif (props[\"__native\"]) {\n\t\tvar { __native, onPress, __onPress, ...rest } = props;\n\t\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeAlertDialogTriggerFrame, {\n\t\t\t...rest,\n\t\t\tonPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)\n\t\t});\n\t}\n\tvar { scope, ...triggerProps } = props;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.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__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogPortal, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...portalProps\n\t});\n};\nvar AlertDialogOverlayFrame = (0, import_core2.styled)(import_dialog.DialogOverlayFrame, { displayName: \"AlertDialogOverlay\" });\nvar AlertDialogOverlay = (0, import_core.createStyledHOC)(AlertDialogOverlayFrame, function AlertDialogOverlay2(props, forwardedRef) {\n\tvar { scope, ...overlayProps } = props;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.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 } = (0, import_core2.createStyledContext)({}, \"AlertDialogContext\");\nvar AlertDialogContent = (0, import_core.createRefComponent)(function AlertDialogContent2(props, forwardedRef) {\n\tvar { scope, children, ...contentProps } = props;\n\tvar dialogScope = getAlertDialogScope(scope);\n\tvar contentRef = React.useRef(null);\n\tvar composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n\tvar cancelRef = React.useRef(null);\n\tvar destructiveRef = React.useRef(null);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogWarningProvider, {\n\t\tcontentName: CONTENT_NAME,\n\t\ttitleName: TITLE_NAME,\n\t\tdocsSlug: \"alert-dialog\",\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContextProvider, {\n\t\t\tscope,\n\t\t\tcancelRef,\n\t\t\tdestructiveRef,\n\t\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.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: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {\n\t\t\t\t\tevent.cancel();\n\t\t\t\t\tif (import_constants.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.cancel();\n\t\t\t\t},\n\t\t\t\tonInteractOutside: function(event) {\n\t\t\t\t\treturn event.cancel();\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.Slottable, { children }), process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })]\n\t\t\t})\n\t\t})\n\t});\n});\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitleFrame = (0, import_core2.styled)(import_core2.View, { displayName: TITLE_NAME });\nmarkAlertDialogPart(AlertDialogTitleFrame, \"title\");\nvar AlertDialogTitle = (0, import_core.createStyledHOC)(AlertDialogTitleFrame, function AlertDialogTitle2(props, forwardedRef) {\n\tvar { scope, ...titleProps } = props;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...titleProps,\n\t\tref: forwardedRef\n\t});\n});\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescriptionFrame = (0, import_core2.styled)(import_core2.View, { displayName: DESCRIPTION_NAME });\nmarkAlertDialogPart(AlertDialogDescriptionFrame, \"description\");\nvar AlertDialogDescription = (0, import_core.createStyledHOC)(AlertDialogDescriptionFrame, function AlertDialogDescription2(props, forwardedRef) {\n\tvar { scope, ...descriptionProps } = props;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...descriptionProps,\n\t\tref: forwardedRef\n\t});\n});\nvar AlertDialogActionFrame = (0, import_core2.styled)(import_core2.View, { displayName: \"AlertDialogAction\" });\nmarkAlertDialogPart(AlertDialogActionFrame, \"action\");\nvar AlertDialogAction = (0, import_core.createStyledHOC)(AlertDialogActionFrame, function AlertDialogAction2(props, forwardedRef) {\n\tvar { scope, ...actionProps } = props;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...actionProps,\n\t\tref: forwardedRef\n\t});\n});\nvar AlertDialogCancelFrame = (0, import_core2.styled)(import_core2.View, { displayName: \"AlertDialogCancel\" });\nmarkAlertDialogPart(AlertDialogCancelFrame, \"cancel\");\nvar AlertDialogCancel = (0, import_core.createStyledHOC)(AlertDialogCancelFrame, function AlertDialogCancel2(props, forwardedRef) {\n\tvar { scope, ...cancelProps } = props;\n\tvar { cancelRef } = useAlertDialogContentContext(scope);\n\tvar ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogClose, {\n\t\tscope: getAlertDialogScope(scope),\n\t\t...cancelProps,\n\t\tref\n\t});\n});\nvar AlertDialogDestructiveFrame = (0, import_core2.styled)(import_core2.View, { displayName: \"AlertDialogDestructive\" });\nmarkAlertDialogPart(AlertDialogDestructiveFrame, \"destructive\");\nvar AlertDialogDestructive = (0, import_core.createStyledHOC)(AlertDialogDestructiveFrame, function AlertDialogDestructive2(props, forwardedRef) {\n\tvar { scope, ...destructiveProps } = props;\n\tvar { destructiveRef } = useAlertDialogContentContext(scope);\n\tvar ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, destructiveRef);\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.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 (!import_constants.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] = (0, import_use_controllable_state.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 part = (0, import_core2.isTamaguiElement)(child) ? child.type.staticConfig[ALERT_DIALOG_PART] : void 0;\n\t\tswitch (part) {\n\t\t\tcase \"trigger\":\n\t\t\t\ttriggerElement = /* @__PURE__ */ React.cloneElement(child, { __native: true });\n\t\t\t\treturn false;\n\t\t\tcase \"title\":\n\t\t\t\ttitle = getStringChildren(child);\n\t\t\t\treturn false;\n\t\t\tcase \"description\":\n\t\t\t\tdescription = getStringChildren(child);\n\t\t\t\treturn false;\n\t\t\tcase \"action\":\n\t\t\tcase \"destructive\":\n\t\t\tcase \"cancel\":\n\t\t\t\tvar style = part === \"action\" ? \"default\" : part === \"destructive\" ? \"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\t(0, import_constants.useIsomorphicLayoutEffect)(function() {\n\t\tif (!open || !native) return;\n\t\tif (title || description) import_react_native.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__ */ (0, import_jsx_runtime.jsx)(import_dialog.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 = (0, import_helpers.withStaticProperties)(AlertDialogInner, {\n\tTrigger: AlertDialogTrigger,\n\tPortal: AlertDialogPortal,\n\tOverlay: AlertDialogOverlay,\n\tContent: AlertDialogContent,\n\tAction: AlertDialogAction,\n\tCancel: AlertDialogCancel,\n\tDestructive: AlertDialogDestruct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CACD;AACD;AACA,SAAS,kBAAkB,OAAO;CACjC,IAAI,SAAS;CACb,iBAAiB,MAAM,SAAS,QAAQ,KAAK,GAAG,SAAS,QAAQ;EAChE,IAAI,OAAO,OAAO,MAAM,aAAa,UAAU;GAC9C,SAAS,OAAO,MAAM;GACtB,OAAO;EACR;EACA,OAAO;CACR,CAAC;CACD,OAAO;AACR;AACA,IAAI,eAAe,GAAG,eAAe,sBAAsB,kBAAkB;CAC5E,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
13
14
|
};
|
|
14
15
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
17
|
var index_exports = {};
|
|
19
18
|
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./AlertDialog.cjs"), module.exports);
|
|
19
|
+
__reExport(index_exports, require("./AlertDialog.cjs"), module.exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./AlertDialog.native.js"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
15
16
|
};
|
|
16
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var index_exports = {};
|
|
21
20
|
module.exports = __toCommonJS(index_exports);
|
|
22
21
|
__reExport(index_exports, require("./AlertDialog.native.js"), module.exports);
|
|
22
|
+
|
|
23
23
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./AlertDialog\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO"}
|
package/dist/esm/AlertDialog.mjs
CHANGED
|
@@ -1,220 +1,171 @@
|
|
|
1
|
+
import { Slottable, View, createRefComponent, createStyledContext, createStyledHOC, styled } from "@tamagui/core";
|
|
1
2
|
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
2
3
|
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
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
const getAlertDialogScope = (scope) => scope;
|
|
9
10
|
const ROOT_NAME = "AlertDialog";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return /* @__PURE__ */jsx(DialogTrigger, {
|
|
31
|
-
scope: getAlertDialogScope(scope),
|
|
32
|
-
...triggerProps,
|
|
33
|
-
ref: forwardedRef
|
|
34
|
-
});
|
|
11
|
+
const ALERT_DIALOG_PART = /* @__PURE__ */ Symbol("AlertDialogPart");
|
|
12
|
+
const markAlertDialogPart = (component, part) => {
|
|
13
|
+
Object.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part });
|
|
14
|
+
};
|
|
15
|
+
const NativeAlertDialogTriggerFrame = styled(View, { displayName: "AlertDialogTrigger" });
|
|
16
|
+
markAlertDialogPart(NativeAlertDialogTriggerFrame, "trigger");
|
|
17
|
+
const AlertDialogTrigger = createStyledHOC(NativeAlertDialogTriggerFrame, function AlertDialogTrigger2(props, forwardedRef) {
|
|
18
|
+
if (props["__native"]) {
|
|
19
|
+
const { __native, onPress, __onPress, ...rest } = props;
|
|
20
|
+
return /* @__PURE__ */ jsx(NativeAlertDialogTriggerFrame, {
|
|
21
|
+
...rest,
|
|
22
|
+
onPress: composeEventHandlers(onPress, __onPress)
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const { scope, ...triggerProps } = props;
|
|
26
|
+
return /* @__PURE__ */ jsx(DialogTrigger, {
|
|
27
|
+
scope: getAlertDialogScope(scope),
|
|
28
|
+
...triggerProps,
|
|
29
|
+
ref: forwardedRef
|
|
30
|
+
});
|
|
35
31
|
});
|
|
36
32
|
const AlertDialogPortal = function AlertDialogPortal2(props) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
scope: getAlertDialogScope(scope),
|
|
43
|
-
...portalProps
|
|
44
|
-
});
|
|
33
|
+
const { scope, ...portalProps } = props;
|
|
34
|
+
return /* @__PURE__ */ jsx(DialogPortal, {
|
|
35
|
+
scope: getAlertDialogScope(scope),
|
|
36
|
+
...portalProps
|
|
37
|
+
});
|
|
45
38
|
};
|
|
46
|
-
const AlertDialogOverlay = styled(DialogOverlayFrame, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return /* @__PURE__ */jsx(DialogOverlay, {
|
|
54
|
-
scope: getAlertDialogScope(scope),
|
|
55
|
-
...overlayProps,
|
|
56
|
-
ref: forwardedRef
|
|
57
|
-
});
|
|
39
|
+
const AlertDialogOverlay = createStyledHOC(styled(DialogOverlayFrame, { displayName: "AlertDialogOverlay" }), function AlertDialogOverlay2(props, forwardedRef) {
|
|
40
|
+
const { scope, ...overlayProps } = props;
|
|
41
|
+
return /* @__PURE__ */ jsx(DialogOverlay, {
|
|
42
|
+
scope: getAlertDialogScope(scope),
|
|
43
|
+
...overlayProps,
|
|
44
|
+
ref: forwardedRef
|
|
45
|
+
});
|
|
58
46
|
});
|
|
59
47
|
const CONTENT_NAME = "AlertDialogContent";
|
|
60
|
-
const {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
preventScroll: true
|
|
92
|
-
});
|
|
93
|
-
}),
|
|
94
|
-
onPointerDownOutside: event => event.preventDefault(),
|
|
95
|
-
onInteractOutside: event => event.preventDefault(),
|
|
96
|
-
children: [/* @__PURE__ */jsx(Slottable, {
|
|
97
|
-
children
|
|
98
|
-
}), process.env.NODE_ENV === "development" && /* @__PURE__ */jsx(DescriptionWarning, {
|
|
99
|
-
contentRef
|
|
100
|
-
})]
|
|
101
|
-
})
|
|
102
|
-
})
|
|
103
|
-
});
|
|
48
|
+
const { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = createStyledContext({}, "AlertDialogContext");
|
|
49
|
+
const AlertDialogContent = createRefComponent(function AlertDialogContent2(props, forwardedRef) {
|
|
50
|
+
const { scope, children, ...contentProps } = props;
|
|
51
|
+
const dialogScope = getAlertDialogScope(scope);
|
|
52
|
+
const contentRef = React.useRef(null);
|
|
53
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
54
|
+
const cancelRef = React.useRef(null);
|
|
55
|
+
return /* @__PURE__ */ jsx(DialogWarningProvider, {
|
|
56
|
+
contentName: CONTENT_NAME,
|
|
57
|
+
titleName: TITLE_NAME,
|
|
58
|
+
docsSlug: "alert-dialog",
|
|
59
|
+
children: /* @__PURE__ */ jsx(AlertDialogContextProvider, {
|
|
60
|
+
scope,
|
|
61
|
+
cancelRef,
|
|
62
|
+
destructiveRef: React.useRef(null),
|
|
63
|
+
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
64
|
+
role: "alertdialog",
|
|
65
|
+
"aria-modal": true,
|
|
66
|
+
scope: dialogScope,
|
|
67
|
+
...contentProps,
|
|
68
|
+
ref: composedRefs,
|
|
69
|
+
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
|
70
|
+
event.cancel();
|
|
71
|
+
if (isWeb) cancelRef.current?.focus({ preventScroll: true });
|
|
72
|
+
}),
|
|
73
|
+
onPointerDownOutside: (event) => event.cancel(),
|
|
74
|
+
onInteractOutside: (event) => event.cancel(),
|
|
75
|
+
children: [/* @__PURE__ */ jsx(Slottable, { children }), process.env.NODE_ENV === "development" && /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })]
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
});
|
|
104
79
|
});
|
|
105
80
|
const TITLE_NAME = "AlertDialogTitle";
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
...titleProps,
|
|
116
|
-
ref: forwardedRef
|
|
117
|
-
});
|
|
81
|
+
const AlertDialogTitleFrame = styled(View, { displayName: TITLE_NAME });
|
|
82
|
+
markAlertDialogPart(AlertDialogTitleFrame, "title");
|
|
83
|
+
const AlertDialogTitle = createStyledHOC(AlertDialogTitleFrame, function AlertDialogTitle2(props, forwardedRef) {
|
|
84
|
+
const { scope, ...titleProps } = props;
|
|
85
|
+
return /* @__PURE__ */ jsx(DialogTitle, {
|
|
86
|
+
scope: getAlertDialogScope(scope),
|
|
87
|
+
...titleProps,
|
|
88
|
+
ref: forwardedRef
|
|
89
|
+
});
|
|
118
90
|
});
|
|
119
91
|
const DESCRIPTION_NAME = "AlertDialogDescription";
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
...descriptionProps,
|
|
130
|
-
ref: forwardedRef
|
|
131
|
-
});
|
|
92
|
+
const AlertDialogDescriptionFrame = styled(View, { displayName: DESCRIPTION_NAME });
|
|
93
|
+
markAlertDialogPart(AlertDialogDescriptionFrame, "description");
|
|
94
|
+
const AlertDialogDescription = createStyledHOC(AlertDialogDescriptionFrame, function AlertDialogDescription2(props, forwardedRef) {
|
|
95
|
+
const { scope, ...descriptionProps } = props;
|
|
96
|
+
return /* @__PURE__ */ jsx(DialogDescription, {
|
|
97
|
+
scope: getAlertDialogScope(scope),
|
|
98
|
+
...descriptionProps,
|
|
99
|
+
ref: forwardedRef
|
|
100
|
+
});
|
|
132
101
|
});
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
...actionProps,
|
|
143
|
-
ref: forwardedRef
|
|
144
|
-
});
|
|
102
|
+
const AlertDialogActionFrame = styled(View, { displayName: "AlertDialogAction" });
|
|
103
|
+
markAlertDialogPart(AlertDialogActionFrame, "action");
|
|
104
|
+
const AlertDialogAction = createStyledHOC(AlertDialogActionFrame, function AlertDialogAction2(props, forwardedRef) {
|
|
105
|
+
const { scope, ...actionProps } = props;
|
|
106
|
+
return /* @__PURE__ */ jsx(DialogClose, {
|
|
107
|
+
scope: getAlertDialogScope(scope),
|
|
108
|
+
...actionProps,
|
|
109
|
+
ref: forwardedRef
|
|
110
|
+
});
|
|
145
111
|
});
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return /* @__PURE__ */jsx(DialogClose, {
|
|
158
|
-
scope: getAlertDialogScope(scope),
|
|
159
|
-
...cancelProps,
|
|
160
|
-
ref
|
|
161
|
-
});
|
|
112
|
+
const AlertDialogCancelFrame = styled(View, { displayName: "AlertDialogCancel" });
|
|
113
|
+
markAlertDialogPart(AlertDialogCancelFrame, "cancel");
|
|
114
|
+
const AlertDialogCancel = createStyledHOC(AlertDialogCancelFrame, function AlertDialogCancel2(props, forwardedRef) {
|
|
115
|
+
const { scope, ...cancelProps } = props;
|
|
116
|
+
const { cancelRef } = useAlertDialogContentContext(scope);
|
|
117
|
+
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
118
|
+
return /* @__PURE__ */ jsx(DialogClose, {
|
|
119
|
+
scope: getAlertDialogScope(scope),
|
|
120
|
+
...cancelProps,
|
|
121
|
+
ref
|
|
122
|
+
});
|
|
162
123
|
});
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return /* @__PURE__ */jsx(DialogClose, {
|
|
175
|
-
scope: getAlertDialogScope(scope),
|
|
176
|
-
...destructiveProps,
|
|
177
|
-
ref
|
|
178
|
-
});
|
|
124
|
+
const AlertDialogDestructiveFrame = styled(View, { displayName: "AlertDialogDestructive" });
|
|
125
|
+
markAlertDialogPart(AlertDialogDestructiveFrame, "destructive");
|
|
126
|
+
const AlertDialogDestructive = createStyledHOC(AlertDialogDestructiveFrame, function AlertDialogDestructive2(props, forwardedRef) {
|
|
127
|
+
const { scope, ...destructiveProps } = props;
|
|
128
|
+
const { destructiveRef } = useAlertDialogContentContext(scope);
|
|
129
|
+
const ref = useComposedRefs(forwardedRef, destructiveRef);
|
|
130
|
+
return /* @__PURE__ */ jsx(DialogClose, {
|
|
131
|
+
scope: getAlertDialogScope(scope),
|
|
132
|
+
...destructiveProps,
|
|
133
|
+
ref
|
|
134
|
+
});
|
|
179
135
|
});
|
|
180
|
-
const DescriptionWarning = ({
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (!isWeb) return;
|
|
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.
|
|
136
|
+
const DescriptionWarning = ({ contentRef }) => {
|
|
137
|
+
if (process.env.NODE_ENV === "development") React.useEffect(() => {
|
|
138
|
+
if (!isWeb) return;
|
|
139
|
+
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.
|
|
186
140
|
|
|
187
141
|
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.
|
|
188
142
|
|
|
189
143
|
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.
|
|
190
144
|
|
|
191
145
|
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
192
|
-
|
|
193
|
-
|
|
146
|
+
}, [contentRef]);
|
|
147
|
+
return null;
|
|
194
148
|
};
|
|
195
|
-
const AlertDialogInner = props => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
scope: getAlertDialogScope(scope),
|
|
203
|
-
...alertDialogProps,
|
|
204
|
-
modal: true
|
|
205
|
-
});
|
|
149
|
+
const AlertDialogInner = (props) => {
|
|
150
|
+
const { scope, native, ...alertDialogProps } = props;
|
|
151
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
152
|
+
scope: getAlertDialogScope(scope),
|
|
153
|
+
...alertDialogProps,
|
|
154
|
+
modal: true
|
|
155
|
+
});
|
|
206
156
|
};
|
|
207
157
|
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
158
|
+
Trigger: AlertDialogTrigger,
|
|
159
|
+
Portal: AlertDialogPortal,
|
|
160
|
+
Overlay: AlertDialogOverlay,
|
|
161
|
+
Content: AlertDialogContent,
|
|
162
|
+
Action: AlertDialogAction,
|
|
163
|
+
Cancel: AlertDialogCancel,
|
|
164
|
+
Destructive: AlertDialogDestructive,
|
|
165
|
+
Title: AlertDialogTitle,
|
|
166
|
+
Description: AlertDialogDescription
|
|
217
167
|
});
|
|
218
168
|
AlertDialog.displayName = ROOT_NAME;
|
|
169
|
+
|
|
219
170
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogDestructive, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
220
171
|
//# sourceMappingURL=AlertDialog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
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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AIrE,KAAK,IAAK;EACnC,MAAM;IAAEP,KAAK;IAAE6E,MAAM;IAAE,GAAGC;EAAiB,CAAC,GAAGvE,KAAK;EACpD,OAAO,eAAgBV,GAAG,CAACb,MAAM,EAAE;IAClCgB,KAAK,EAAED,mBAAmB,CAACC,KAAK,CAAC;IACjC,GAAG8E,gBAAgB;IACnBC,KAAK,EAAE;EACR,CAAC,CAAC;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
|
+
{"version":3,"file":"AlertDialog.js","names":[],"sources":["esm/AlertDialog.js"],"sourcesContent":["import { Slottable, View, createRefComponent, createStyledContext, createStyledHOC, styled } from \"@tamagui/core\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb } from \"@tamagui/constants\";\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 ALERT_DIALOG_PART = /* @__PURE__ */ Symbol(\"AlertDialogPart\");\nconst markAlertDialogPart = (component, part) => {\n\tObject.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part });\n};\nconst NativeAlertDialogTriggerFrame = styled(View, { displayName: \"AlertDialogTrigger\" });\nmarkAlertDialogPart(NativeAlertDialogTriggerFrame, \"trigger\");\nconst AlertDialogTrigger = createStyledHOC(NativeAlertDialogTriggerFrame, 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 = createStyledHOC(styled(DialogOverlayFrame, { displayName: \"AlertDialogOverlay\" }), 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 = createRefComponent(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.cancel();\n\t\t\t\t\tif (isWeb) cancelRef.current?.focus({ preventScroll: true });\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: (event) => event.cancel(),\n\t\t\t\tonInteractOutside: (event) => event.cancel(),\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 AlertDialogTitleFrame = styled(View, { displayName: TITLE_NAME });\nmarkAlertDialogPart(AlertDialogTitleFrame, \"title\");\nconst AlertDialogTitle = createStyledHOC(AlertDialogTitleFrame, 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 AlertDialogDescriptionFrame = styled(View, { displayName: DESCRIPTION_NAME });\nmarkAlertDialogPart(AlertDialogDescriptionFrame, \"description\");\nconst AlertDialogDescription = createStyledHOC(AlertDialogDescriptionFrame, 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 AlertDialogActionFrame = styled(View, { displayName: \"AlertDialogAction\" });\nmarkAlertDialogPart(AlertDialogActionFrame, \"action\");\nconst AlertDialogAction = createStyledHOC(AlertDialogActionFrame, 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 AlertDialogCancelFrame = styled(View, { displayName: \"AlertDialogCancel\" });\nmarkAlertDialogPart(AlertDialogCancelFrame, \"cancel\");\nconst AlertDialogCancel = createStyledHOC(AlertDialogCancelFrame, 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 AlertDialogDestructiveFrame = styled(View, { displayName: \"AlertDialogDestructive\" });\nmarkAlertDialogPart(AlertDialogDestructiveFrame, \"destructive\");\nconst AlertDialogDestructive = createStyledHOC(AlertDialogDestructiveFrame, 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":";;;;;;;;;AAQA,MAAM,uBAAuB,UAAU;AACvC,MAAM,YAAY;AAClB,MAAM,oBAAoC,uBAAO,iBAAiB;AAClE,MAAM,uBAAuB,WAAW,SAAS;CAChD,OAAO,OAAO,UAAU,cAAc,GAAG,oBAAoB,KAAK,CAAC;AACpE;AACA,MAAM,gC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