@tamagui/alert-dialog 2.7.7 → 3.0.0-beta.643.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AlertDialog.cjs +173 -230
- package/dist/cjs/AlertDialog.native.cjs +309 -0
- package/dist/cjs/AlertDialog.native.js +255 -322
- package/dist/cjs/AlertDialog.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/AlertDialog.mjs +138 -187
- package/dist/esm/AlertDialog.mjs.map +1 -1
- package/dist/esm/AlertDialog.native.js +227 -289
- package/dist/esm/AlertDialog.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/jsx/AlertDialog.mjs +138 -187
- package/dist/jsx/AlertDialog.mjs.map +1 -1
- package/dist/jsx/AlertDialog.native.cjs +309 -0
- package/dist/jsx/AlertDialog.native.js +255 -322
- package/dist/jsx/AlertDialog.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +21 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +20 -19
- package/src/AlertDialog.tsx +106 -75
- package/types/AlertDialog.d.ts +40 -74
- package/types/AlertDialog.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","AlertDialog_exports","AlertDialog","AlertDialogAction","AlertDialogCancel","AlertDialogContent","AlertDialogDescription","AlertDialogDestructive","AlertDialogOverlay","AlertDialogPortal","AlertDialogTitle","AlertDialogTrigger","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_core","import_dialog","import_helpers","import_use_controllable_state","React","import_react_native","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","styled","View","styleable","AlertDialogTrigger2","props","forwardedRef","__native","onPress","__onPress","rest","jsx","composeEventHandlers","triggerProps","DialogTrigger","ref","AlertDialogPortal2","portalProps","DialogPortal","DialogOverlayFrame","AlertDialogOverlay2","overlayProps","DialogOverlay","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","createStyledContext","forwardRef","AlertDialogContent2","children","contentProps","dialogScope","contentRef","useRef","composedRefs","useComposedRefs","cancelRef","destructiveRef","DialogWarningProvider","contentName","titleName","TITLE_NAME","docsSlug","jsxs","DialogContent","role","onOpenAutoFocus","event","preventDefault","isWeb","_cancelRef_current","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","Slottable","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitle2","titleProps","DialogTitle","DESCRIPTION_NAME","AlertDialogDescription2","descriptionProps","DialogDescription","ACTION_NAME","AlertDialogAction2","actionProps","DialogClose","CANCEL_NAME","AlertDialogCancel2","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructive2","destructiveProps","param","useEffect","_contentRef_current","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","open","setOpen","useControllableState","prop","defaultProp","defaultOpen","onChange","onOpenChange","transition","triggerElement","title","description","buttons","forEachChildDeep","Children","toArray","child","isValidElement","isTamaguiElement","type","staticConfig","componentName","cloneElement","getStringChildren","style","text","_childProps_onPress","childProps","push","useIsomorphicLayoutEffect","Alert","alert","Dialog","modal","onChild","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","err","return","string","child2","withStaticProperties","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAO,CAAAC,MAAA;AAEhB,IAAAC,SAAA,GAAAF,MAAA,CAAAG,cAAA;AAAA,IACEC,gBAAA,GAAAJ,MAAA,CAAAK,wBAAA;AAAA,IACAC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAAA,IACAC,YAAA,GAAAR,MAAA,CAAAS,cAAA;AAAA,IACAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,SACKC,IAAA,IAAAD,GAAA,EAAAb,SAAA,CAAAY,MAAA,EAAAE,IAAA;IAYPC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IACEE,UAAA;EAAA,CACA;AAAA;AACA,IACAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACA,SAAAG,GAAA,IAAAlB,iBAAA,CAAAe,IAAA,QAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAAApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MACAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MACAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,CAAAiB,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IACA;EAAA;EACA,OACKE,EAAA;AACP;AACA,IAAAM,OAAS,GAAAA,CAAAC,GAAA,EAAAC,UAAA,EAAAd,MAA4B,M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GAAA;EACA;IAAa;MACX,KAAAT,yBACA,IAAAG,SAAA,CAAAO,MAAA,UAAAP,SAAA,CAAAO,MAAA;IAAA;MAAA,IAAAT,iBAEA,QAAAC,cAAA;IAAA;EAEF;AAAO;AACT,SACAd,iBAASA,CAAAP,KAAA;EACP,IAAA8B,MAAA;EAAOjC,gBACT,CAAA9G,KAAA,CAAA+G,QAAA,CAAAC,OAAA,CAAAC,KAAA,aAAA+B,MAAA;IAAA,IACF,OAAAA,MAAA,CAAArI,KAAA,CAAA0B,QAAA;MAAA0G,MACD,GAAAC,MAAA,CAAArI,KAAA,CAAA0B,QAAA;MAED;IACE;IACA,WAAI;EACF;EAAuC,OACzC0G,MAAA;AAAA;AAGF,IAAAnK,WAAI,GAAQ,IAAAkB,cAAA,CAAAmJ,oBAAA,EAAAnD,gBAAA;EACVoD,OAAA,EAAA7J,kBAAa;EAA6B8J,MAAA,EACxChK,iBAAiB;EACfiK,OAAA,EAAAlK,kBAAY;EAAAmK,OACd,EAAAtK,kBAAA;EAAAuK,MACD,EAAAzK,iBAAA;EAAA0K,MACH,EAAAzK,iBAAA;EAAA0K,WACF,EAAAvK,sBAAA;EAEAwK,KAAA,EAAArK,gBAAO;EACTsK,WAAA,EAAA1K;AAEA;AAIEJ,WAAA,CAAA+K,WAAoB,GAAAvJ,SAAU","ignoreList":[]}
|
|
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,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKpG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CACpE,OAAO;CACP,YAAY;AACb,CAAC,IAAI,QACL,GACD;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB;CAC7B,mBAAmB;CACnB,yBAAyB;CACzB,yBAAyB;CACzB,0BAA0B;CAC1B,8BAA8B;CAC9B,8BAA8B;CAC9B,0BAA0B;CAC1B,yBAAyB;CACz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AAI,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,eAAe,GAAG,eAAe,sBAAsB,kBAAkB;CAC5E,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,aAAa;CACb,OAAO;CACP,aAAa;AACd,CAAC;AACD,YAAY,cAAc"}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from "./AlertDialog.mjs"
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./AlertDialog.mjs"
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from "./AlertDialog.mjs"
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export * from "./AlertDialog.mjs"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./AlertDialog.native.js"), module.exports);
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
15
16
|
};
|
|
16
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
19
|
var index_exports = {};
|
|
21
20
|
module.exports = __toCommonJS(index_exports);
|
|
22
21
|
__reExport(index_exports, require("./AlertDialog.native.js"), module.exports);
|
|
22
|
+
|
|
23
23
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["
|
|
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
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,29 +34,30 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/animate-presence": "
|
|
38
|
-
"@tamagui/compose-refs": "
|
|
39
|
-
"@tamagui/constants": "
|
|
40
|
-
"@tamagui/core": "
|
|
41
|
-
"@tamagui/create-context": "
|
|
42
|
-
"@tamagui/dialog": "
|
|
43
|
-
"@tamagui/dismissable": "
|
|
44
|
-
"@tamagui/focus-scope": "
|
|
45
|
-
"@tamagui/helpers": "
|
|
46
|
-
"@tamagui/polyfill-dev": "
|
|
47
|
-
"@tamagui/portal": "
|
|
48
|
-
"@tamagui/remove-scroll": "
|
|
49
|
-
"@tamagui/stacks": "
|
|
50
|
-
"@tamagui/text": "
|
|
51
|
-
"@tamagui/use-controllable-state": "
|
|
37
|
+
"@tamagui/animate-presence": "3.0.0-beta.643.1",
|
|
38
|
+
"@tamagui/compose-refs": "3.0.0-beta.643.1",
|
|
39
|
+
"@tamagui/constants": "3.0.0-beta.643.1",
|
|
40
|
+
"@tamagui/core": "3.0.0-beta.643.1",
|
|
41
|
+
"@tamagui/create-context": "3.0.0-beta.643.1",
|
|
42
|
+
"@tamagui/dialog": "3.0.0-beta.643.1",
|
|
43
|
+
"@tamagui/dismissable": "3.0.0-beta.643.1",
|
|
44
|
+
"@tamagui/focus-scope": "3.0.0-beta.643.1",
|
|
45
|
+
"@tamagui/helpers": "3.0.0-beta.643.1",
|
|
46
|
+
"@tamagui/polyfill-dev": "3.0.0-beta.643.1",
|
|
47
|
+
"@tamagui/portal": "3.0.0-beta.643.1",
|
|
48
|
+
"@tamagui/remove-scroll": "3.0.0-beta.643.1",
|
|
49
|
+
"@tamagui/stacks": "3.0.0-beta.643.1",
|
|
50
|
+
"@tamagui/text": "3.0.0-beta.643.1",
|
|
51
|
+
"@tamagui/use-controllable-state": "3.0.0-beta.643.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@tamagui/build": "
|
|
54
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
55
55
|
"react": ">=19",
|
|
56
|
-
"react-native": "0.
|
|
56
|
+
"react-native": "0.86.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"react": ">=19"
|
|
59
|
+
"react": ">=19",
|
|
60
|
+
"react-native-web": "*"
|
|
60
61
|
},
|
|
61
62
|
"module:jsx": "dist/jsx",
|
|
62
63
|
"removeSideEffects": true,
|
package/src/AlertDialog.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createStyledHOC, createRefComponent } from '@tamagui/core'
|
|
1
2
|
// forked from radix-ui
|
|
2
3
|
// https://github.com/radix-ui/primitives/blob/main/packages/react/alert-dialog/src/AlertDialog.tsx
|
|
3
4
|
|
|
@@ -46,6 +47,26 @@ const getAlertDialogScope = (scope?: string) => scope
|
|
|
46
47
|
* -----------------------------------------------------------------------------------------------*/
|
|
47
48
|
|
|
48
49
|
const ROOT_NAME = 'AlertDialog'
|
|
50
|
+
const ALERT_DIALOG_PART = Symbol('AlertDialogPart')
|
|
51
|
+
|
|
52
|
+
type AlertDialogPart =
|
|
53
|
+
| 'trigger'
|
|
54
|
+
| 'title'
|
|
55
|
+
| 'description'
|
|
56
|
+
| 'action'
|
|
57
|
+
| 'cancel'
|
|
58
|
+
| 'destructive'
|
|
59
|
+
|
|
60
|
+
type AlertDialogPartStaticConfig = {
|
|
61
|
+
[ALERT_DIALOG_PART]?: AlertDialogPart
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const markAlertDialogPart = (
|
|
65
|
+
component: { staticConfig: object },
|
|
66
|
+
part: AlertDialogPart
|
|
67
|
+
) => {
|
|
68
|
+
Object.assign(component.staticConfig, { [ALERT_DIALOG_PART]: part })
|
|
69
|
+
}
|
|
49
70
|
|
|
50
71
|
export type AlertDialogScopes = string
|
|
51
72
|
|
|
@@ -64,32 +85,33 @@ const TRIGGER_NAME = 'AlertDialogTrigger'
|
|
|
64
85
|
type AlertDialogTriggerProps = ScopedProps<DialogTriggerProps>
|
|
65
86
|
|
|
66
87
|
const NativeAlertDialogTriggerFrame = styled(View, {
|
|
67
|
-
|
|
88
|
+
displayName: TRIGGER_NAME,
|
|
68
89
|
})
|
|
90
|
+
markAlertDialogPart(NativeAlertDialogTriggerFrame, 'trigger')
|
|
69
91
|
|
|
70
|
-
const AlertDialogTrigger =
|
|
71
|
-
NativeAlertDialogTriggerFrame
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<NativeAlertDialogTriggerFrame
|
|
77
|
-
{...rest}
|
|
78
|
-
onPress={composeEventHandlers(onPress, __onPress)}
|
|
79
|
-
/>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const { scope, ...triggerProps } = props
|
|
92
|
+
const AlertDialogTrigger = createStyledHOC(
|
|
93
|
+
NativeAlertDialogTriggerFrame,
|
|
94
|
+
function AlertDialogTrigger(props: AlertDialogTriggerProps, forwardedRef) {
|
|
95
|
+
if (props['__native']) {
|
|
96
|
+
const { __native, onPress, __onPress, ...rest } = props as any
|
|
84
97
|
return (
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
{
|
|
88
|
-
ref={forwardedRef}
|
|
98
|
+
<NativeAlertDialogTriggerFrame
|
|
99
|
+
{...rest}
|
|
100
|
+
onPress={composeEventHandlers(onPress, __onPress)}
|
|
89
101
|
/>
|
|
90
102
|
)
|
|
91
103
|
}
|
|
92
|
-
|
|
104
|
+
|
|
105
|
+
const { scope, ...triggerProps } = props
|
|
106
|
+
return (
|
|
107
|
+
<DialogTrigger
|
|
108
|
+
scope={getAlertDialogScope(scope)}
|
|
109
|
+
{...triggerProps}
|
|
110
|
+
ref={forwardedRef}
|
|
111
|
+
/>
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
)
|
|
93
115
|
|
|
94
116
|
/* -------------------------------------------------------------------------------------------------
|
|
95
117
|
* AlertDialogPortal
|
|
@@ -113,14 +135,15 @@ const AlertDialogPortal: React.FC<AlertDialogPortalProps> = function AlertDialog
|
|
|
113
135
|
const OVERLAY_NAME = 'AlertDialogOverlay'
|
|
114
136
|
|
|
115
137
|
const AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
116
|
-
|
|
138
|
+
displayName: OVERLAY_NAME,
|
|
117
139
|
})
|
|
118
140
|
|
|
119
141
|
type AlertDialogOverlayExtraProps = ScopedProps<{}> & DialogOverlayExtraProps
|
|
120
142
|
type AlertDialogOverlayProps = AlertDialogOverlayExtraProps & DialogOverlayProps
|
|
121
143
|
|
|
122
|
-
const AlertDialogOverlay =
|
|
123
|
-
|
|
144
|
+
const AlertDialogOverlay = createStyledHOC(
|
|
145
|
+
AlertDialogOverlayFrame,
|
|
146
|
+
function AlertDialogOverlay(props: AlertDialogOverlayProps, forwardedRef) {
|
|
124
147
|
const { scope, ...overlayProps } = props
|
|
125
148
|
return (
|
|
126
149
|
<DialogOverlay
|
|
@@ -152,7 +175,7 @@ type AlertDialogContentProps = ScopedProps<
|
|
|
152
175
|
Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'>
|
|
153
176
|
>
|
|
154
177
|
|
|
155
|
-
const AlertDialogContent =
|
|
178
|
+
const AlertDialogContent = createRefComponent<TamaguiElement, AlertDialogContentProps>(
|
|
156
179
|
function AlertDialogContent(props, forwardedRef) {
|
|
157
180
|
const { scope, children, ...contentProps } = props
|
|
158
181
|
const dialogScope = getAlertDialogScope(scope)
|
|
@@ -181,14 +204,14 @@ const AlertDialogContent = React.forwardRef<TamaguiElement, AlertDialogContentPr
|
|
|
181
204
|
onOpenAutoFocus={composeEventHandlers(
|
|
182
205
|
contentProps.onOpenAutoFocus,
|
|
183
206
|
(event) => {
|
|
184
|
-
event.
|
|
207
|
+
event.cancel()
|
|
185
208
|
if (isWeb) {
|
|
186
209
|
cancelRef.current?.focus({ preventScroll: true })
|
|
187
210
|
}
|
|
188
211
|
}
|
|
189
212
|
)}
|
|
190
|
-
onPointerDownOutside={(event) => event.
|
|
191
|
-
onInteractOutside={(event) => event.
|
|
213
|
+
onPointerDownOutside={(event) => event.cancel()}
|
|
214
|
+
onInteractOutside={(event) => event.cancel()}
|
|
192
215
|
>
|
|
193
216
|
{/**
|
|
194
217
|
* We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`
|
|
@@ -216,11 +239,13 @@ const TITLE_NAME = 'AlertDialogTitle'
|
|
|
216
239
|
type AlertDialogTitleProps = ScopedProps<DialogTitleProps>
|
|
217
240
|
|
|
218
241
|
const AlertDialogTitleFrame = styled(View, {
|
|
219
|
-
|
|
242
|
+
displayName: TITLE_NAME,
|
|
220
243
|
})
|
|
244
|
+
markAlertDialogPart(AlertDialogTitleFrame, 'title')
|
|
221
245
|
|
|
222
|
-
const AlertDialogTitle =
|
|
223
|
-
|
|
246
|
+
const AlertDialogTitle = createStyledHOC(
|
|
247
|
+
AlertDialogTitleFrame,
|
|
248
|
+
function AlertDialogTitle(props: AlertDialogTitleProps, forwardedRef) {
|
|
224
249
|
const { scope, ...titleProps } = props
|
|
225
250
|
return (
|
|
226
251
|
<DialogTitle
|
|
@@ -241,22 +266,23 @@ const DESCRIPTION_NAME = 'AlertDialogDescription'
|
|
|
241
266
|
type AlertDialogDescriptionProps = ScopedProps<DialogDescriptionProps>
|
|
242
267
|
|
|
243
268
|
const AlertDialogDescriptionFrame = styled(View, {
|
|
244
|
-
|
|
269
|
+
displayName: DESCRIPTION_NAME,
|
|
245
270
|
})
|
|
271
|
+
markAlertDialogPart(AlertDialogDescriptionFrame, 'description')
|
|
246
272
|
|
|
247
|
-
const AlertDialogDescription =
|
|
248
|
-
AlertDialogDescriptionFrame
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
273
|
+
const AlertDialogDescription = createStyledHOC(
|
|
274
|
+
AlertDialogDescriptionFrame,
|
|
275
|
+
function AlertDialogDescription(props: AlertDialogDescriptionProps, forwardedRef) {
|
|
276
|
+
const { scope, ...descriptionProps } = props
|
|
277
|
+
return (
|
|
278
|
+
<DialogDescription
|
|
279
|
+
scope={getAlertDialogScope(scope)}
|
|
280
|
+
{...descriptionProps}
|
|
281
|
+
ref={forwardedRef}
|
|
282
|
+
/>
|
|
283
|
+
)
|
|
284
|
+
}
|
|
285
|
+
)
|
|
260
286
|
|
|
261
287
|
/* -------------------------------------------------------------------------------------------------
|
|
262
288
|
* AlertDialogAction
|
|
@@ -267,11 +293,13 @@ const ACTION_NAME = 'AlertDialogAction'
|
|
|
267
293
|
type AlertDialogActionProps = ScopedProps<DialogCloseProps>
|
|
268
294
|
|
|
269
295
|
const AlertDialogActionFrame = styled(View, {
|
|
270
|
-
|
|
296
|
+
displayName: ACTION_NAME,
|
|
271
297
|
})
|
|
298
|
+
markAlertDialogPart(AlertDialogActionFrame, 'action')
|
|
272
299
|
|
|
273
|
-
const AlertDialogAction =
|
|
274
|
-
|
|
300
|
+
const AlertDialogAction = createStyledHOC(
|
|
301
|
+
AlertDialogActionFrame,
|
|
302
|
+
function AlertDialogAction(props: AlertDialogActionProps, forwardedRef) {
|
|
275
303
|
const { scope, ...actionProps } = props
|
|
276
304
|
return (
|
|
277
305
|
<DialogClose
|
|
@@ -292,11 +320,13 @@ const CANCEL_NAME = 'AlertDialogCancel'
|
|
|
292
320
|
type AlertDialogCancelProps = ScopedProps<DialogCloseProps>
|
|
293
321
|
|
|
294
322
|
const AlertDialogCancelFrame = styled(View, {
|
|
295
|
-
|
|
323
|
+
displayName: CANCEL_NAME,
|
|
296
324
|
})
|
|
325
|
+
markAlertDialogPart(AlertDialogCancelFrame, 'cancel')
|
|
297
326
|
|
|
298
|
-
const AlertDialogCancel =
|
|
299
|
-
|
|
327
|
+
const AlertDialogCancel = createStyledHOC(
|
|
328
|
+
AlertDialogCancelFrame,
|
|
329
|
+
function AlertDialogCancel(props: AlertDialogCancelProps, forwardedRef) {
|
|
300
330
|
const { scope, ...cancelProps } = props
|
|
301
331
|
const { cancelRef } = useAlertDialogContentContext(scope)
|
|
302
332
|
const ref = useComposedRefs(forwardedRef, cancelRef)
|
|
@@ -313,20 +343,21 @@ const DESTRUCTIVE_NAME = 'AlertDialogDestructive'
|
|
|
313
343
|
type AlertDialogDestructiveProps = ScopedProps<DialogCloseProps>
|
|
314
344
|
|
|
315
345
|
const AlertDialogDestructiveFrame = styled(View, {
|
|
316
|
-
|
|
346
|
+
displayName: DESTRUCTIVE_NAME,
|
|
317
347
|
})
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
)
|
|
328
|
-
|
|
329
|
-
|
|
348
|
+
markAlertDialogPart(AlertDialogDestructiveFrame, 'destructive')
|
|
349
|
+
|
|
350
|
+
const AlertDialogDestructive = createStyledHOC(
|
|
351
|
+
AlertDialogDestructiveFrame,
|
|
352
|
+
function AlertDialogDestructive(props: AlertDialogDestructiveProps, forwardedRef) {
|
|
353
|
+
const { scope, ...destructiveProps } = props
|
|
354
|
+
const { destructiveRef } = useAlertDialogContentContext(scope)
|
|
355
|
+
const ref = useComposedRefs(forwardedRef, destructiveRef)
|
|
356
|
+
return (
|
|
357
|
+
<DialogClose scope={getAlertDialogScope(scope)} {...destructiveProps} ref={ref} />
|
|
358
|
+
)
|
|
359
|
+
}
|
|
360
|
+
)
|
|
330
361
|
|
|
331
362
|
/* ---------------------------------------------------------------------------------------------- */
|
|
332
363
|
|
|
@@ -380,31 +411,31 @@ const AlertDialogInner: React.FC<AlertDialogProps> = (props) => {
|
|
|
380
411
|
|
|
381
412
|
forEachChildDeep(React.Children.toArray(props.children), (child) => {
|
|
382
413
|
if (!React.isValidElement(child)) return false
|
|
383
|
-
const
|
|
384
|
-
? child.type.staticConfig
|
|
385
|
-
:
|
|
386
|
-
switch (
|
|
387
|
-
case
|
|
414
|
+
const part = isTamaguiElement(child)
|
|
415
|
+
? (child.type.staticConfig as AlertDialogPartStaticConfig)[ALERT_DIALOG_PART]
|
|
416
|
+
: undefined
|
|
417
|
+
switch (part) {
|
|
418
|
+
case 'trigger': {
|
|
388
419
|
triggerElement = React.cloneElement(child as any, {
|
|
389
420
|
__native: true,
|
|
390
421
|
})
|
|
391
422
|
return false
|
|
392
423
|
}
|
|
393
|
-
case
|
|
424
|
+
case 'title': {
|
|
394
425
|
title = getStringChildren(child)
|
|
395
426
|
return false
|
|
396
427
|
}
|
|
397
|
-
case
|
|
428
|
+
case 'description': {
|
|
398
429
|
description = getStringChildren(child)
|
|
399
430
|
return false
|
|
400
431
|
}
|
|
401
|
-
case
|
|
402
|
-
case
|
|
403
|
-
case
|
|
432
|
+
case 'action':
|
|
433
|
+
case 'destructive':
|
|
434
|
+
case 'cancel': {
|
|
404
435
|
const style =
|
|
405
|
-
|
|
436
|
+
part === 'action'
|
|
406
437
|
? 'default'
|
|
407
|
-
:
|
|
438
|
+
: part === 'destructive'
|
|
408
439
|
? 'destructive'
|
|
409
440
|
: 'cancel'
|
|
410
441
|
const text = getStringChildren(child)
|