@tamagui/alert-dialog 3.0.0-beta.669.1 → 3.0.0-beta.728.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 +0 -1
- package/dist/cjs/AlertDialog.native.cjs +0 -1
- package/dist/cjs/AlertDialog.native.js +0 -1
- package/dist/cjs/AlertDialog.native.js.map +1 -1
- package/dist/cjs/index.cjs +0 -1
- package/dist/cjs/index.native.cjs +0 -1
- package/dist/cjs/index.native.js +0 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/AlertDialog.native.js.map +1 -1
- package/dist/jsx/AlertDialog.native.cjs +0 -1
- package/dist/jsx/AlertDialog.native.js +0 -1
- package/dist/jsx/AlertDialog.native.js.map +1 -1
- package/dist/jsx/index.native.cjs +0 -1
- package/dist/jsx/index.native.js +0 -1
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +18 -18
package/dist/cjs/AlertDialog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n//# sourceMappingURL=AlertDialog.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OA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AAS,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"}
|
|
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: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n//# sourceMappingURL=AlertDialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CA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CACT,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
package/dist/cjs/index.cjs
CHANGED
package/dist/cjs/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["esm/AlertDialog.native.js"],"sourcesContent":["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Slottable, View, createRefComponent, createStyledContext, createStyledHOC, isTamaguiElement, styled } from \"@tamagui/core\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\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 ALERT_DIALOG_PART = /* @__PURE__ */ Symbol(\"AlertDialogPart\");\nvar markAlertDialogPart = function(component, part) {\n\tObject.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part });\n};\nvar NativeAlertDialogTriggerFrame = styled(View, { displayName: \"AlertDialogTrigger\" });\nmarkAlertDialogPart(NativeAlertDialogTriggerFrame, \"trigger\");\nvar AlertDialogTrigger = createStyledHOC(NativeAlertDialogTriggerFrame, 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 = createStyledHOC(styled(DialogOverlayFrame, { displayName: \"AlertDialogOverlay\" }), 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 = 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 = 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.cancel();\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.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__ */ 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 AlertDialogTitleFrame = styled(View, { displayName: TITLE_NAME });\nmarkAlertDialogPart(AlertDialogTitleFrame, \"title\");\nvar AlertDialogTitle = createStyledHOC(AlertDialogTitleFrame, 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 AlertDialogDescriptionFrame = styled(View, { displayName: DESCRIPTION_NAME });\nmarkAlertDialogPart(AlertDialogDescriptionFrame, \"description\");\nvar AlertDialogDescription = createStyledHOC(AlertDialogDescriptionFrame, 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 AlertDialogActionFrame = styled(View, { displayName: \"AlertDialogAction\" });\nmarkAlertDialogPart(AlertDialogActionFrame, \"action\");\nvar AlertDialogAction = createStyledHOC(AlertDialogActionFrame, 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 AlertDialogCancelFrame = styled(View, { displayName: \"AlertDialogCancel\" });\nmarkAlertDialogPart(AlertDialogCancelFrame, \"cancel\");\nvar AlertDialogCancel = createStyledHOC(AlertDialogCancelFrame, 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 AlertDialogDestructiveFrame = styled(View, { displayName: \"AlertDialogDestructive\" });\nmarkAlertDialogPart(AlertDialogDestructiveFrame, \"destructive\");\nvar AlertDialogDestructive = createStyledHOC(AlertDialogDestructiveFrame, 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 part = 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\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":";;;;;;;;;;;AAUA,IAAI,sBAAsB,SAAS,OAAO;CACzC,OAAO;AACR;AACA,IAAI,YAAY;AAChB,IAAI,oBAAoC,uBAAO,iBAAiB;AAChE,IAAI,sBAAsB,SAAS,WAAW,MAAM;CACnD,OAAO,OAAO,UAAU,cAAc,GAAG,oBAAoB,KAAK,CAAC;AACpE;AACA,IAAI,gCAAgC,OA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ACD,OAAO;AACR;AACA,IAAI,cAAc,qBAAqB,kBAAkB;CACxD,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
|
1
|
+
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["esm/AlertDialog.native.js"],"sourcesContent":["import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { Slottable, View, createRefComponent, createStyledContext, createStyledHOC, isTamaguiElement, styled } from \"@tamagui/core\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\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 ALERT_DIALOG_PART = /* @__PURE__ */ Symbol(\"AlertDialogPart\");\nvar markAlertDialogPart = function(component, part) {\n\tObject.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part });\n};\nvar NativeAlertDialogTriggerFrame = styled(View, { displayName: \"AlertDialogTrigger\" });\nmarkAlertDialogPart(NativeAlertDialogTriggerFrame, \"trigger\");\nvar AlertDialogTrigger = createStyledHOC(NativeAlertDialogTriggerFrame, 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 = createStyledHOC(styled(DialogOverlayFrame, { displayName: \"AlertDialogOverlay\" }), 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 = 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 = 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.cancel();\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.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__ */ 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 AlertDialogTitleFrame = styled(View, { displayName: TITLE_NAME });\nmarkAlertDialogPart(AlertDialogTitleFrame, \"title\");\nvar AlertDialogTitle = createStyledHOC(AlertDialogTitleFrame, 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 AlertDialogDescriptionFrame = styled(View, { displayName: DESCRIPTION_NAME });\nmarkAlertDialogPart(AlertDialogDescriptionFrame, \"description\");\nvar AlertDialogDescription = createStyledHOC(AlertDialogDescriptionFrame, 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 AlertDialogActionFrame = styled(View, { displayName: \"AlertDialogAction\" });\nmarkAlertDialogPart(AlertDialogActionFrame, \"action\");\nvar AlertDialogAction = createStyledHOC(AlertDialogActionFrame, 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 AlertDialogCancelFrame = styled(View, { displayName: \"AlertDialogCancel\" });\nmarkAlertDialogPart(AlertDialogCancelFrame, \"cancel\");\nvar AlertDialogCancel = createStyledHOC(AlertDialogCancelFrame, 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 AlertDialogDestructiveFrame = styled(View, { displayName: \"AlertDialogDestructive\" });\nmarkAlertDialogPart(AlertDialogDestructiveFrame, \"destructive\");\nvar AlertDialogDestructive = createStyledHOC(AlertDialogDestructiveFrame, 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 part = 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\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":";;;;;;;;;;;AAUA,IAAI,sBAAsB,SAAS,OAAO;CACzC,OAAO;AACR;AACA,IAAI,YAAY;AAChB,IAAI,oBAAoC,uBAAO,iBAAiB;AAChE,IAAI,sBAAsB,SAAS,WAAW,MAAM;CACnD,OAAO,OAAO,UAAU,cAAc,GAAG,oBAAoB,KAAK,CAAC;AACpE;AACA,IAAI,gCAAgC,OAAO,MAAM,EAAE,aAAa,qBAAqB,CAAC;AACtF,oBAAoB,+BAA+B,SAAS;AAC5D,IAAI,qBAAqB,gBAAgB,+BAA+B,SAAS,oBAAoB,OAAO,cAAc;CACzH,IAAI,MAAM,aAAa;EACtB,IAAI,EAAE,UAAU,SAAS,WAAW,GAAG,SAAS;EAChD,OAAuB,oBAAI,+BAA+B;GACzD,GAAG;GACH,SAAS,qBAAqB,SAAS,SAAS;EACjD,CAAC;CACF;CACA,IAAI,EAAE,OAAO,GAAG,iBAAiB;CACjC,OAAuB,oBAAI,eAAe;EACzC,OAAO,oBAAoB,KAAK;EAChC,GAAG;EACH,KAAK;CACN,CAAC;AACF,CAAC;AACD,IAAI,oBAAoB,SAAS,mBAAmB,OAAO;CAC1D,IAAI,EAAE,OAAO,GAAG,gBAAgB;CAChC,OAAuB,oBAAI,cAAc;EACxC,OAAO,oBAAoB,KAAK;EAChC,GAAG;CACJ,CAAC;AACF;AACA,IAAI,qBAAqB,gBAAgB,OAAO,oBAAoB,EAAE,aAAa,qBAAqB,CAAC,GAAG,SAAS,oBAAoB,OAAO,cAAc;CAC7J,IAAI,EAAE,OAAO,GAAG,iBAAiB;CACjC,OAAuB,oBAAI,eAAe;EACzC,OAAO,oBAAoB,KAAK;EAChC,GAAG;EACH,KAAK;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B,MAAM,SAAS,QAAQ,WAAW,QAAQ,GAAG,OAAO;EAC/F;CACD,SAAS,KAAK;EACb,oBAAoB;EACpB,iBAAiB;CAClB,UAAU;EACT,IAAI;GACH,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM,UAAU,OAAO;EAC9E,UAAU;GACT,IAAI,mBAAmB,MAAM;EAC9B;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,cAAc,qBAAqB,kBAAkB;CACxD,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["jsx/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: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n//# sourceMappingURL=AlertDialog.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO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S,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"}
|
|
1
|
+
{"version":3,"file":"AlertDialog.native.js","names":[],"sources":["jsx/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: AlertDialogDestructive,\n\tTitle: AlertDialogTitle,\n\tDescription: AlertDialogDescription\n});\nAlertDialog.displayName = ROOT_NAME;\n//# sourceMappingURL=AlertDialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC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T,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/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":"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/alert-dialog",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.728.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/animate-presence": "3.0.0-beta.
|
|
38
|
-
"@tamagui/compose-refs": "3.0.0-beta.
|
|
39
|
-
"@tamagui/constants": "3.0.0-beta.
|
|
40
|
-
"@tamagui/core": "3.0.0-beta.
|
|
41
|
-
"@tamagui/create-context": "3.0.0-beta.
|
|
42
|
-
"@tamagui/dialog": "3.0.0-beta.
|
|
43
|
-
"@tamagui/dismissable": "3.0.0-beta.
|
|
44
|
-
"@tamagui/focus-scope": "3.0.0-beta.
|
|
45
|
-
"@tamagui/helpers": "3.0.0-beta.
|
|
46
|
-
"@tamagui/polyfill-dev": "3.0.0-beta.
|
|
47
|
-
"@tamagui/portal": "3.0.0-beta.
|
|
48
|
-
"@tamagui/remove-scroll": "3.0.0-beta.
|
|
49
|
-
"@tamagui/stacks": "3.0.0-beta.
|
|
50
|
-
"@tamagui/text": "3.0.0-beta.
|
|
51
|
-
"@tamagui/use-controllable-state": "3.0.0-beta.
|
|
37
|
+
"@tamagui/animate-presence": "3.0.0-beta.728.1",
|
|
38
|
+
"@tamagui/compose-refs": "3.0.0-beta.728.1",
|
|
39
|
+
"@tamagui/constants": "3.0.0-beta.728.1",
|
|
40
|
+
"@tamagui/core": "3.0.0-beta.728.1",
|
|
41
|
+
"@tamagui/create-context": "3.0.0-beta.728.1",
|
|
42
|
+
"@tamagui/dialog": "3.0.0-beta.728.1",
|
|
43
|
+
"@tamagui/dismissable": "3.0.0-beta.728.1",
|
|
44
|
+
"@tamagui/focus-scope": "3.0.0-beta.728.1",
|
|
45
|
+
"@tamagui/helpers": "3.0.0-beta.728.1",
|
|
46
|
+
"@tamagui/polyfill-dev": "3.0.0-beta.728.1",
|
|
47
|
+
"@tamagui/portal": "3.0.0-beta.728.1",
|
|
48
|
+
"@tamagui/remove-scroll": "3.0.0-beta.728.1",
|
|
49
|
+
"@tamagui/stacks": "3.0.0-beta.728.1",
|
|
50
|
+
"@tamagui/text": "3.0.0-beta.728.1",
|
|
51
|
+
"@tamagui/use-controllable-state": "3.0.0-beta.728.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@tamagui/build": "3.0.0-beta.
|
|
55
|
-
"react": "
|
|
54
|
+
"@tamagui/build": "3.0.0-beta.728.1",
|
|
55
|
+
"react": "19.2.3",
|
|
56
56
|
"react-native": "0.86.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|