@hanzogui/alert-dialog 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/AlertDialog.cjs +276 -0
- package/dist/cjs/AlertDialog.native.js +379 -0
- package/dist/cjs/AlertDialog.native.js.map +1 -0
- package/dist/cjs/index.cjs +18 -0
- package/dist/cjs/index.native.js +21 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/esm/AlertDialog.mjs +231 -0
- package/dist/esm/AlertDialog.mjs.map +1 -0
- package/dist/esm/AlertDialog.native.js +333 -0
- package/dist/esm/AlertDialog.native.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +2 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/jsx/AlertDialog.mjs +231 -0
- package/dist/jsx/AlertDialog.mjs.map +1 -0
- package/dist/jsx/AlertDialog.native.js +379 -0
- package/dist/jsx/AlertDialog.native.js.map +1 -0
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +1 -0
- package/dist/jsx/index.mjs +2 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +21 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/package.json +66 -0
- package/src/AlertDialog.tsx +515 -0
- package/src/index.ts +1 -0
- package/types/AlertDialog.d.ts +169 -0
- package/types/index.d.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { useComposedRefs } from "@hanzo/gui-compose-refs";
|
|
2
|
+
import { isWeb } from "@hanzo/gui-constants";
|
|
3
|
+
import { Slottable, View, createStyledContext, styled } from "@hanzo/gui-core";
|
|
4
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@hanzo/gui-dialog";
|
|
5
|
+
import { composeEventHandlers, withStaticProperties } from "@hanzo/gui-helpers";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
const getAlertDialogScope = scope => scope,
|
|
9
|
+
ROOT_NAME = "AlertDialog",
|
|
10
|
+
TRIGGER_NAME = "AlertDialogTrigger",
|
|
11
|
+
NativeAlertDialogTriggerFrame = styled(View, {
|
|
12
|
+
name: TRIGGER_NAME
|
|
13
|
+
}),
|
|
14
|
+
AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function (props, forwardedRef) {
|
|
15
|
+
if (props.__native) {
|
|
16
|
+
const {
|
|
17
|
+
__native,
|
|
18
|
+
onPress,
|
|
19
|
+
__onPress,
|
|
20
|
+
...rest
|
|
21
|
+
} = props;
|
|
22
|
+
return /* @__PURE__ */jsx(NativeAlertDialogTriggerFrame, {
|
|
23
|
+
...rest,
|
|
24
|
+
onPress: composeEventHandlers(onPress, __onPress)
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
const {
|
|
28
|
+
scope,
|
|
29
|
+
...triggerProps
|
|
30
|
+
} = props;
|
|
31
|
+
return /* @__PURE__ */jsx(DialogTrigger, {
|
|
32
|
+
scope: getAlertDialogScope(scope),
|
|
33
|
+
...triggerProps,
|
|
34
|
+
ref: forwardedRef
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const AlertDialogPortal = function (props) {
|
|
38
|
+
const {
|
|
39
|
+
scope,
|
|
40
|
+
...portalProps
|
|
41
|
+
} = props;
|
|
42
|
+
return /* @__PURE__ */jsx(DialogPortal, {
|
|
43
|
+
scope: getAlertDialogScope(scope),
|
|
44
|
+
...portalProps
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
OVERLAY_NAME = "AlertDialogOverlay",
|
|
48
|
+
AlertDialogOverlayFrame = styled(DialogOverlayFrame, {
|
|
49
|
+
name: OVERLAY_NAME
|
|
50
|
+
}),
|
|
51
|
+
AlertDialogOverlay = AlertDialogOverlayFrame.styleable(function (props, forwardedRef) {
|
|
52
|
+
const {
|
|
53
|
+
scope,
|
|
54
|
+
...overlayProps
|
|
55
|
+
} = props;
|
|
56
|
+
return /* @__PURE__ */jsx(DialogOverlay, {
|
|
57
|
+
scope: getAlertDialogScope(scope),
|
|
58
|
+
...overlayProps,
|
|
59
|
+
ref: forwardedRef
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
CONTENT_NAME = "AlertDialogContent",
|
|
63
|
+
{
|
|
64
|
+
Provider: AlertDialogContextProvider,
|
|
65
|
+
useStyledContext: useAlertDialogContentContext
|
|
66
|
+
} = createStyledContext({}, "AlertDialogContext"),
|
|
67
|
+
AlertDialogContent = React.forwardRef(function (props, forwardedRef) {
|
|
68
|
+
const {
|
|
69
|
+
scope,
|
|
70
|
+
children,
|
|
71
|
+
...contentProps
|
|
72
|
+
} = props,
|
|
73
|
+
dialogScope = getAlertDialogScope(scope),
|
|
74
|
+
contentRef = React.useRef(null),
|
|
75
|
+
composedRefs = useComposedRefs(forwardedRef, contentRef),
|
|
76
|
+
cancelRef = React.useRef(null),
|
|
77
|
+
destructiveRef = React.useRef(null);
|
|
78
|
+
return /* @__PURE__ */jsx(DialogWarningProvider, {
|
|
79
|
+
contentName: CONTENT_NAME,
|
|
80
|
+
titleName: TITLE_NAME,
|
|
81
|
+
docsSlug: "alert-dialog",
|
|
82
|
+
children: /* @__PURE__ */jsx(AlertDialogContextProvider, {
|
|
83
|
+
scope,
|
|
84
|
+
cancelRef,
|
|
85
|
+
destructiveRef,
|
|
86
|
+
children: /* @__PURE__ */jsxs(DialogContent, {
|
|
87
|
+
role: "alertdialog",
|
|
88
|
+
"aria-modal": !0,
|
|
89
|
+
scope: dialogScope,
|
|
90
|
+
...contentProps,
|
|
91
|
+
ref: composedRefs,
|
|
92
|
+
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, event => {
|
|
93
|
+
event.preventDefault(), isWeb && cancelRef.current?.focus({
|
|
94
|
+
preventScroll: !0
|
|
95
|
+
});
|
|
96
|
+
}),
|
|
97
|
+
onPointerDownOutside: event => event.preventDefault(),
|
|
98
|
+
onInteractOutside: event => event.preventDefault(),
|
|
99
|
+
children: [/* @__PURE__ */jsx(Slottable, {
|
|
100
|
+
children
|
|
101
|
+
}), process.env.NODE_ENV === "development" && /* @__PURE__ */jsx(DescriptionWarning, {
|
|
102
|
+
contentRef
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
}),
|
|
108
|
+
TITLE_NAME = "AlertDialogTitle",
|
|
109
|
+
AlertDialogTitleFrame = styled(View, {
|
|
110
|
+
name: TITLE_NAME
|
|
111
|
+
}),
|
|
112
|
+
AlertDialogTitle = AlertDialogTitleFrame.styleable(function (props, forwardedRef) {
|
|
113
|
+
const {
|
|
114
|
+
scope,
|
|
115
|
+
...titleProps
|
|
116
|
+
} = props;
|
|
117
|
+
return /* @__PURE__ */jsx(DialogTitle, {
|
|
118
|
+
scope: getAlertDialogScope(scope),
|
|
119
|
+
...titleProps,
|
|
120
|
+
ref: forwardedRef
|
|
121
|
+
});
|
|
122
|
+
}),
|
|
123
|
+
DESCRIPTION_NAME = "AlertDialogDescription",
|
|
124
|
+
AlertDialogDescriptionFrame = styled(View, {
|
|
125
|
+
name: DESCRIPTION_NAME
|
|
126
|
+
}),
|
|
127
|
+
AlertDialogDescription = AlertDialogDescriptionFrame.styleable(function (props, forwardedRef) {
|
|
128
|
+
const {
|
|
129
|
+
scope,
|
|
130
|
+
...descriptionProps
|
|
131
|
+
} = props;
|
|
132
|
+
return /* @__PURE__ */jsx(DialogDescription, {
|
|
133
|
+
scope: getAlertDialogScope(scope),
|
|
134
|
+
...descriptionProps,
|
|
135
|
+
ref: forwardedRef
|
|
136
|
+
});
|
|
137
|
+
}),
|
|
138
|
+
ACTION_NAME = "AlertDialogAction",
|
|
139
|
+
AlertDialogActionFrame = styled(View, {
|
|
140
|
+
name: ACTION_NAME
|
|
141
|
+
}),
|
|
142
|
+
AlertDialogAction = AlertDialogActionFrame.styleable(function (props, forwardedRef) {
|
|
143
|
+
const {
|
|
144
|
+
scope,
|
|
145
|
+
...actionProps
|
|
146
|
+
} = props;
|
|
147
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
148
|
+
scope: getAlertDialogScope(scope),
|
|
149
|
+
...actionProps,
|
|
150
|
+
ref: forwardedRef
|
|
151
|
+
});
|
|
152
|
+
}),
|
|
153
|
+
CANCEL_NAME = "AlertDialogCancel",
|
|
154
|
+
AlertDialogCancelFrame = styled(View, {
|
|
155
|
+
name: CANCEL_NAME
|
|
156
|
+
}),
|
|
157
|
+
AlertDialogCancel = AlertDialogCancelFrame.styleable(function (props, forwardedRef) {
|
|
158
|
+
const {
|
|
159
|
+
scope,
|
|
160
|
+
...cancelProps
|
|
161
|
+
} = props,
|
|
162
|
+
{
|
|
163
|
+
cancelRef
|
|
164
|
+
} = useAlertDialogContentContext(scope),
|
|
165
|
+
ref = useComposedRefs(forwardedRef, cancelRef);
|
|
166
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
167
|
+
scope: getAlertDialogScope(scope),
|
|
168
|
+
...cancelProps,
|
|
169
|
+
ref
|
|
170
|
+
});
|
|
171
|
+
}),
|
|
172
|
+
DESTRUCTIVE_NAME = "AlertDialogDestructive",
|
|
173
|
+
AlertDialogDestructiveFrame = styled(View, {
|
|
174
|
+
name: DESTRUCTIVE_NAME
|
|
175
|
+
}),
|
|
176
|
+
AlertDialogDestructive = AlertDialogDestructiveFrame.styleable(function (props, forwardedRef) {
|
|
177
|
+
const {
|
|
178
|
+
scope,
|
|
179
|
+
...destructiveProps
|
|
180
|
+
} = props,
|
|
181
|
+
{
|
|
182
|
+
destructiveRef
|
|
183
|
+
} = useAlertDialogContentContext(scope),
|
|
184
|
+
ref = useComposedRefs(forwardedRef, destructiveRef);
|
|
185
|
+
return /* @__PURE__ */jsx(DialogClose, {
|
|
186
|
+
scope: getAlertDialogScope(scope),
|
|
187
|
+
...destructiveProps,
|
|
188
|
+
ref
|
|
189
|
+
});
|
|
190
|
+
}),
|
|
191
|
+
DescriptionWarning = ({
|
|
192
|
+
contentRef
|
|
193
|
+
}) => (process.env.NODE_ENV === "development" && React.useEffect(() => {
|
|
194
|
+
if (!isWeb) return;
|
|
195
|
+
document.getElementById(
|
|
196
|
+
// @ts-ignore
|
|
197
|
+
contentRef.current?.getAttribute("aria-describedby")) || console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
198
|
+
|
|
199
|
+
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.
|
|
200
|
+
|
|
201
|
+
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.
|
|
202
|
+
|
|
203
|
+
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
204
|
+
}, [contentRef]), null),
|
|
205
|
+
AlertDialogInner = props => {
|
|
206
|
+
const {
|
|
207
|
+
scope,
|
|
208
|
+
native,
|
|
209
|
+
...alertDialogProps
|
|
210
|
+
} = props,
|
|
211
|
+
dialogScope = getAlertDialogScope(scope);
|
|
212
|
+
return /* @__PURE__ */jsx(Dialog, {
|
|
213
|
+
scope: dialogScope,
|
|
214
|
+
...alertDialogProps,
|
|
215
|
+
modal: !0
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
const AlertDialog = withStaticProperties(AlertDialogInner, {
|
|
219
|
+
Trigger: AlertDialogTrigger,
|
|
220
|
+
Portal: AlertDialogPortal,
|
|
221
|
+
Overlay: AlertDialogOverlay,
|
|
222
|
+
Content: AlertDialogContent,
|
|
223
|
+
Action: AlertDialogAction,
|
|
224
|
+
Cancel: AlertDialogCancel,
|
|
225
|
+
Destructive: AlertDialogDestructive,
|
|
226
|
+
Title: AlertDialogTitle,
|
|
227
|
+
Description: AlertDialogDescription
|
|
228
|
+
});
|
|
229
|
+
AlertDialog.displayName = ROOT_NAME;
|
|
230
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogDestructive, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
231
|
+
//# sourceMappingURL=AlertDialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useComposedRefs","isWeb","Slottable","View","createStyledContext","styled","Dialog","DialogClose","DialogContent","DialogDescription","DialogOverlay","DialogOverlayFrame","DialogPortal","DialogTitle","DialogTrigger","DialogWarningProvider","composeEventHandlers","withStaticProperties","React","jsx","jsxs","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","name","AlertDialogTrigger","styleable","props","forwardedRef","__native","onPress","__onPress","rest","triggerProps","ref","AlertDialogPortal","portalProps","OVERLAY_NAME","AlertDialogOverlayFrame","AlertDialogOverlay","overlayProps","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","AlertDialogContent","forwardRef","children","contentProps","dialogScope","contentRef","useRef","composedRefs","cancelRef","destructiveRef","contentName","titleName","TITLE_NAME","docsSlug","role","onOpenAutoFocus","event","preventDefault","current","focus","preventScroll","onPointerDownOutside","onInteractOutside","process","env","NODE_ENV","DescriptionWarning","AlertDialogTitleFrame","AlertDialogTitle","titleProps","DESCRIPTION_NAME","AlertDialogDescriptionFrame","AlertDialogDescription","descriptionProps","ACTION_NAME","AlertDialogActionFrame","AlertDialogAction","actionProps","CANCEL_NAME","AlertDialogCancelFrame","AlertDialogCancel","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructiveFrame","AlertDialogDestructive","destructiveProps","useEffect","document","getElementById","getAttribute","console","warn","AlertDialogInner","native","alertDialogProps","modal","AlertDialog","Trigger","Portal","Overlay","Content","Action","Cancel","Destructive","Title","Description","displayName"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,QAAwC;AAEjD,SACEC,SAAA,EACAC,IAAA,EACAC,mBAAA,EAEAC,MAAA,QACK;AAYP,SACEC,MAAA,EACAC,WAAA,EACAC,aAAA,EACAC,iBAAA,EACAC,aAAA,EACAC,kBAAA,EACAC,YAAA,EACAC,WAAA,EACAC,aAAA,EACAC,qBAAA,QACK;AACP,SAASC,oBAAA,EAAsBC,oBAAA,QAA4B;AAE3D,YAAYC,KAAA,MAAW;AAqCb,SAAAC,GAAA,EAmGAC,IAAA,QAnGA;AAlCV,MAAMC,mBAAA,GAAuBC,KAAA,IAAmBA,KAAA;EAM1CC,SAAA,GAAY;EAcZC,YAAA,GAAe;EAIfC,6BAAA,GAAgCpB,MAAA,CAAOF,IAAA,EAAM;IACjDuB,IAAA,EAAMF;EACR,CAAC;EAEKG,kBAAA,GACJF,6BAAA,CAA8BG,SAAA,CAC5B,UAA4BC,KAAA,EAAOC,YAAA,EAAc;IAC/C,IAAID,KAAA,CAAME,QAAA,EAAa;MACrB,MAAM;QAAEA,QAAA;QAAUC,OAAA;QAASC,SAAA;QAAW,GAAGC;MAAK,IAAIL,KAAA;MAClD,OACE,eAAAV,GAAA,CAACM,6BAAA;QACE,GAAGS,IAAA;QAC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GV;EAGH+C,gBAAA,GAAgDvE,KAAA,IAAU;IAC9D,MAAM;QAAEP,KAAA;QAAO+E,MAAA;QAAQ,GAAGC;MAAiB,IAAIzE,KAAA;MACzCuB,WAAA,GAAc/B,mBAAA,CAAoBC,KAAK;IAoF7C,OAAO,eAAAH,GAAA,CAACb,MAAA;MAAOgB,KAAA,EAAO8B,WAAA;MAAc,GAAGkD,gBAAA;MAAkBC,KAAA,EAAK;IAAA,CAAC;EACjE;AA6BA,MAAMC,WAAA,GAAcvF,oBAAA,CAAqBmF,gBAAA,EAAkB;EACzDK,OAAA,EAAS9E,kBAAA;EACT+E,MAAA,EAAQrE,iBAAA;EACRsE,OAAA,EAASlE,kBAAA;EACTmE,OAAA,EAAS5D,kBAAA;EACT6D,MAAA,EAAQzB,iBAAA;EACR0B,MAAA,EAAQtB,iBAAA;EACRuB,WAAA,EAAanB,sBAAA;EACboB,KAAA,EAAOpC,gBAAA;EACPqC,WAAA,EAAajC;AACf,CAAC;AAEDwB,WAAA,CAAYU,WAAA,GAAc3F,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
34
|
+
var AlertDialog_exports = {};
|
|
35
|
+
__export(AlertDialog_exports, {
|
|
36
|
+
AlertDialog: () => AlertDialog,
|
|
37
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
38
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
39
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
40
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
41
|
+
AlertDialogDestructive: () => AlertDialogDestructive,
|
|
42
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
43
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
44
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
45
|
+
AlertDialogTrigger: () => AlertDialogTrigger
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(AlertDialog_exports);
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
49
|
+
import_gui_compose_refs = require("@hanzo/gui-compose-refs"),
|
|
50
|
+
import_gui_constants = require("@hanzo/gui-constants"),
|
|
51
|
+
import_gui_core = require("@hanzo/gui-core"),
|
|
52
|
+
import_gui_dialog = require("@hanzo/gui-dialog"),
|
|
53
|
+
import_gui_helpers = require("@hanzo/gui-helpers"),
|
|
54
|
+
import_gui_use_controllable_state = require("@hanzo/gui-use-controllable-state"),
|
|
55
|
+
React = __toESM(require("react"), 1),
|
|
56
|
+
import_react_native = require("react-native"),
|
|
57
|
+
getAlertDialogScope = function (scope) {
|
|
58
|
+
return scope;
|
|
59
|
+
},
|
|
60
|
+
ROOT_NAME = "AlertDialog",
|
|
61
|
+
TRIGGER_NAME = "AlertDialogTrigger",
|
|
62
|
+
NativeAlertDialogTriggerFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
63
|
+
name: TRIGGER_NAME
|
|
64
|
+
}),
|
|
65
|
+
AlertDialogTrigger = NativeAlertDialogTriggerFrame.styleable(function (props, forwardedRef) {
|
|
66
|
+
if (props.__native) {
|
|
67
|
+
var {
|
|
68
|
+
__native,
|
|
69
|
+
onPress,
|
|
70
|
+
__onPress,
|
|
71
|
+
...rest
|
|
72
|
+
} = props;
|
|
73
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(NativeAlertDialogTriggerFrame, {
|
|
74
|
+
...rest,
|
|
75
|
+
onPress: (0, import_gui_helpers.composeEventHandlers)(onPress, __onPress)
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
var {
|
|
79
|
+
scope,
|
|
80
|
+
...triggerProps
|
|
81
|
+
} = props;
|
|
82
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogTrigger, {
|
|
83
|
+
scope: getAlertDialogScope(scope),
|
|
84
|
+
...triggerProps,
|
|
85
|
+
ref: forwardedRef
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
var AlertDialogPortal = function (props) {
|
|
89
|
+
var {
|
|
90
|
+
scope,
|
|
91
|
+
...portalProps
|
|
92
|
+
} = props;
|
|
93
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogPortal, {
|
|
94
|
+
scope: getAlertDialogScope(scope),
|
|
95
|
+
...portalProps
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
OVERLAY_NAME = "AlertDialogOverlay",
|
|
99
|
+
AlertDialogOverlayFrame = (0, import_gui_core.styled)(import_gui_dialog.DialogOverlayFrame, {
|
|
100
|
+
name: OVERLAY_NAME
|
|
101
|
+
}),
|
|
102
|
+
AlertDialogOverlay = AlertDialogOverlayFrame.styleable(function (props, forwardedRef) {
|
|
103
|
+
var {
|
|
104
|
+
scope,
|
|
105
|
+
...overlayProps
|
|
106
|
+
} = props;
|
|
107
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogOverlay, {
|
|
108
|
+
scope: getAlertDialogScope(scope),
|
|
109
|
+
...overlayProps,
|
|
110
|
+
ref: forwardedRef
|
|
111
|
+
});
|
|
112
|
+
}),
|
|
113
|
+
CONTENT_NAME = "AlertDialogContent",
|
|
114
|
+
{
|
|
115
|
+
Provider: AlertDialogContextProvider,
|
|
116
|
+
useStyledContext: useAlertDialogContentContext
|
|
117
|
+
} = (0, import_gui_core.createStyledContext)({}, "AlertDialogContext"),
|
|
118
|
+
AlertDialogContent = /* @__PURE__ */React.forwardRef(function (props, forwardedRef) {
|
|
119
|
+
var {
|
|
120
|
+
scope,
|
|
121
|
+
children,
|
|
122
|
+
...contentProps
|
|
123
|
+
} = props,
|
|
124
|
+
dialogScope = getAlertDialogScope(scope),
|
|
125
|
+
contentRef = React.useRef(null),
|
|
126
|
+
composedRefs = (0, import_gui_compose_refs.useComposedRefs)(forwardedRef, contentRef),
|
|
127
|
+
cancelRef = React.useRef(null),
|
|
128
|
+
destructiveRef = React.useRef(null);
|
|
129
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogWarningProvider, {
|
|
130
|
+
contentName: CONTENT_NAME,
|
|
131
|
+
titleName: TITLE_NAME,
|
|
132
|
+
docsSlug: "alert-dialog",
|
|
133
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(AlertDialogContextProvider, {
|
|
134
|
+
scope,
|
|
135
|
+
cancelRef,
|
|
136
|
+
destructiveRef,
|
|
137
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_gui_dialog.DialogContent, {
|
|
138
|
+
role: "alertdialog",
|
|
139
|
+
"aria-modal": !0,
|
|
140
|
+
scope: dialogScope,
|
|
141
|
+
...contentProps,
|
|
142
|
+
ref: composedRefs,
|
|
143
|
+
onOpenAutoFocus: (0, import_gui_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function (event) {
|
|
144
|
+
if (event.preventDefault(), import_gui_constants.isWeb) {
|
|
145
|
+
var _cancelRef_current;
|
|
146
|
+
(_cancelRef_current = cancelRef.current) === null || _cancelRef_current === void 0 || _cancelRef_current.focus({
|
|
147
|
+
preventScroll: !0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}),
|
|
151
|
+
onPointerDownOutside: function (event) {
|
|
152
|
+
return event.preventDefault();
|
|
153
|
+
},
|
|
154
|
+
onInteractOutside: function (event) {
|
|
155
|
+
return event.preventDefault();
|
|
156
|
+
},
|
|
157
|
+
children: [
|
|
158
|
+
/**
|
|
159
|
+
* We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`
|
|
160
|
+
* around everything, otherwise the `DescriptionWarning` would be rendered straight away.
|
|
161
|
+
* This is because we want the accessibility checks to run only once the content is actually
|
|
162
|
+
* open and that behaviour is already encapsulated in `DialogContent`.
|
|
163
|
+
*/
|
|
164
|
+
/* @__PURE__ */
|
|
165
|
+
(0, import_jsx_runtime.jsx)(import_gui_core.Slottable, {
|
|
166
|
+
children
|
|
167
|
+
}), process.env.NODE_ENV === "development" && /* @__PURE__ */(0, import_jsx_runtime.jsx)(DescriptionWarning, {
|
|
168
|
+
contentRef
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
})
|
|
172
|
+
});
|
|
173
|
+
}),
|
|
174
|
+
TITLE_NAME = "AlertDialogTitle",
|
|
175
|
+
AlertDialogTitleFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
176
|
+
name: TITLE_NAME
|
|
177
|
+
}),
|
|
178
|
+
AlertDialogTitle = AlertDialogTitleFrame.styleable(function (props, forwardedRef) {
|
|
179
|
+
var {
|
|
180
|
+
scope,
|
|
181
|
+
...titleProps
|
|
182
|
+
} = props;
|
|
183
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogTitle, {
|
|
184
|
+
scope: getAlertDialogScope(scope),
|
|
185
|
+
...titleProps,
|
|
186
|
+
ref: forwardedRef
|
|
187
|
+
});
|
|
188
|
+
}),
|
|
189
|
+
DESCRIPTION_NAME = "AlertDialogDescription",
|
|
190
|
+
AlertDialogDescriptionFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
191
|
+
name: DESCRIPTION_NAME
|
|
192
|
+
}),
|
|
193
|
+
AlertDialogDescription = AlertDialogDescriptionFrame.styleable(function (props, forwardedRef) {
|
|
194
|
+
var {
|
|
195
|
+
scope,
|
|
196
|
+
...descriptionProps
|
|
197
|
+
} = props;
|
|
198
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogDescription, {
|
|
199
|
+
scope: getAlertDialogScope(scope),
|
|
200
|
+
...descriptionProps,
|
|
201
|
+
ref: forwardedRef
|
|
202
|
+
});
|
|
203
|
+
}),
|
|
204
|
+
ACTION_NAME = "AlertDialogAction",
|
|
205
|
+
AlertDialogActionFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
206
|
+
name: ACTION_NAME
|
|
207
|
+
}),
|
|
208
|
+
AlertDialogAction = AlertDialogActionFrame.styleable(function (props, forwardedRef) {
|
|
209
|
+
var {
|
|
210
|
+
scope,
|
|
211
|
+
...actionProps
|
|
212
|
+
} = props;
|
|
213
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogClose, {
|
|
214
|
+
scope: getAlertDialogScope(scope),
|
|
215
|
+
...actionProps,
|
|
216
|
+
ref: forwardedRef
|
|
217
|
+
});
|
|
218
|
+
}),
|
|
219
|
+
CANCEL_NAME = "AlertDialogCancel",
|
|
220
|
+
AlertDialogCancelFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
221
|
+
name: CANCEL_NAME
|
|
222
|
+
}),
|
|
223
|
+
AlertDialogCancel = AlertDialogCancelFrame.styleable(function (props, forwardedRef) {
|
|
224
|
+
var {
|
|
225
|
+
scope,
|
|
226
|
+
...cancelProps
|
|
227
|
+
} = props,
|
|
228
|
+
{
|
|
229
|
+
cancelRef
|
|
230
|
+
} = useAlertDialogContentContext(scope),
|
|
231
|
+
ref = (0, import_gui_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
232
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogClose, {
|
|
233
|
+
scope: getAlertDialogScope(scope),
|
|
234
|
+
...cancelProps,
|
|
235
|
+
ref
|
|
236
|
+
});
|
|
237
|
+
}),
|
|
238
|
+
DESTRUCTIVE_NAME = "AlertDialogDestructive",
|
|
239
|
+
AlertDialogDestructiveFrame = (0, import_gui_core.styled)(import_gui_core.View, {
|
|
240
|
+
name: DESTRUCTIVE_NAME
|
|
241
|
+
}),
|
|
242
|
+
AlertDialogDestructive = AlertDialogDestructiveFrame.styleable(function (props, forwardedRef) {
|
|
243
|
+
var {
|
|
244
|
+
scope,
|
|
245
|
+
...destructiveProps
|
|
246
|
+
} = props,
|
|
247
|
+
{
|
|
248
|
+
destructiveRef
|
|
249
|
+
} = useAlertDialogContentContext(scope),
|
|
250
|
+
ref = (0, import_gui_compose_refs.useComposedRefs)(forwardedRef, destructiveRef);
|
|
251
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.DialogClose, {
|
|
252
|
+
scope: getAlertDialogScope(scope),
|
|
253
|
+
...destructiveProps,
|
|
254
|
+
ref
|
|
255
|
+
});
|
|
256
|
+
}),
|
|
257
|
+
DescriptionWarning = function (param) {
|
|
258
|
+
var {
|
|
259
|
+
contentRef
|
|
260
|
+
} = param;
|
|
261
|
+
return process.env.NODE_ENV === "development" && React.useEffect(function () {
|
|
262
|
+
var _contentRef_current;
|
|
263
|
+
if (import_gui_constants.isWeb) {
|
|
264
|
+
var hasDescription = document.getElementById((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.getAttribute("aria-describedby"));
|
|
265
|
+
hasDescription || console.warn(`\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
|
266
|
+
|
|
267
|
+
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.
|
|
268
|
+
|
|
269
|
+
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.
|
|
270
|
+
|
|
271
|
+
For more information, see https://tamagui.dev/docs/components/alert-dialog`);
|
|
272
|
+
}
|
|
273
|
+
}, [contentRef]), null;
|
|
274
|
+
},
|
|
275
|
+
AlertDialogInner = function (props) {
|
|
276
|
+
var {
|
|
277
|
+
scope,
|
|
278
|
+
native,
|
|
279
|
+
...alertDialogProps
|
|
280
|
+
} = props,
|
|
281
|
+
dialogScope = getAlertDialogScope(scope),
|
|
282
|
+
[open, setOpen] = (0, import_gui_use_controllable_state.useControllableState)({
|
|
283
|
+
prop: props.open,
|
|
284
|
+
defaultProp: props.defaultOpen || !1,
|
|
285
|
+
onChange: props.onOpenChange,
|
|
286
|
+
transition: !0
|
|
287
|
+
}),
|
|
288
|
+
triggerElement = null,
|
|
289
|
+
title = "",
|
|
290
|
+
description = "",
|
|
291
|
+
buttons = [];
|
|
292
|
+
return forEachChildDeep(React.Children.toArray(props.children), function (child) {
|
|
293
|
+
if (! /* @__PURE__ */React.isValidElement(child)) return !1;
|
|
294
|
+
var name = (0, import_gui_core.isTamaguiElement)(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
295
|
+
switch (name) {
|
|
296
|
+
case TRIGGER_NAME:
|
|
297
|
+
return triggerElement = /* @__PURE__ */React.cloneElement(child, {
|
|
298
|
+
__native: !0
|
|
299
|
+
}), !1;
|
|
300
|
+
case TITLE_NAME:
|
|
301
|
+
return title = getStringChildren(child), !1;
|
|
302
|
+
case DESCRIPTION_NAME:
|
|
303
|
+
return description = getStringChildren(child), !1;
|
|
304
|
+
case ACTION_NAME:
|
|
305
|
+
case DESTRUCTIVE_NAME:
|
|
306
|
+
case CANCEL_NAME:
|
|
307
|
+
{
|
|
308
|
+
var style = name === ACTION_NAME ? "default" : name === DESTRUCTIVE_NAME ? "destructive" : "cancel",
|
|
309
|
+
text = getStringChildren(child),
|
|
310
|
+
onPress = function () {
|
|
311
|
+
var _childProps_onPress,
|
|
312
|
+
childProps = child.props;
|
|
313
|
+
childProps == null || (_childProps_onPress = childProps.onPress) === null || _childProps_onPress === void 0 || _childProps_onPress.call(childProps, {
|
|
314
|
+
native: !0
|
|
315
|
+
}), setOpen(!1);
|
|
316
|
+
};
|
|
317
|
+
return buttons.push({
|
|
318
|
+
style,
|
|
319
|
+
text,
|
|
320
|
+
// @ts-ignore
|
|
321
|
+
onPress
|
|
322
|
+
}), !1;
|
|
323
|
+
}
|
|
324
|
+
default:
|
|
325
|
+
return !0;
|
|
326
|
+
}
|
|
327
|
+
}), (0, import_gui_constants.useIsomorphicLayoutEffect)(function () {
|
|
328
|
+
!open || !native || (title || description) && import_react_native.Alert.alert(title, description, buttons);
|
|
329
|
+
}, [native, open]), native ? /* @__PURE__ */React.cloneElement(triggerElement, {
|
|
330
|
+
__onPress: function () {
|
|
331
|
+
setOpen(!0);
|
|
332
|
+
}
|
|
333
|
+
}) : /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_dialog.Dialog, {
|
|
334
|
+
scope: dialogScope,
|
|
335
|
+
...alertDialogProps,
|
|
336
|
+
modal: !0
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
function forEachChildDeep(children, onChild) {
|
|
340
|
+
var _iteratorNormalCompletion = !0,
|
|
341
|
+
_didIteratorError = !1,
|
|
342
|
+
_iteratorError = void 0;
|
|
343
|
+
try {
|
|
344
|
+
for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
345
|
+
var child = _step.value;
|
|
346
|
+
if (/* @__PURE__ */React.isValidElement(child) && onChild(child)) {
|
|
347
|
+
var childProps = child.props;
|
|
348
|
+
childProps.children && forEachChildDeep(React.Children.toArray(childProps.children), onChild);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} catch (err) {
|
|
352
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
353
|
+
} finally {
|
|
354
|
+
try {
|
|
355
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
356
|
+
} finally {
|
|
357
|
+
if (_didIteratorError) throw _iteratorError;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function getStringChildren(child) {
|
|
362
|
+
var string = "";
|
|
363
|
+
return forEachChildDeep(React.Children.toArray(child), function (child2) {
|
|
364
|
+
return typeof child2.props.children == "string" ? (string = child2.props.children, !1) : !0;
|
|
365
|
+
}), string;
|
|
366
|
+
}
|
|
367
|
+
var AlertDialog = (0, import_gui_helpers.withStaticProperties)(AlertDialogInner, {
|
|
368
|
+
Trigger: AlertDialogTrigger,
|
|
369
|
+
Portal: AlertDialogPortal,
|
|
370
|
+
Overlay: AlertDialogOverlay,
|
|
371
|
+
Content: AlertDialogContent,
|
|
372
|
+
Action: AlertDialogAction,
|
|
373
|
+
Cancel: AlertDialogCancel,
|
|
374
|
+
Destructive: AlertDialogDestructive,
|
|
375
|
+
Title: AlertDialogTitle,
|
|
376
|
+
Description: AlertDialogDescription
|
|
377
|
+
});
|
|
378
|
+
AlertDialog.displayName = ROOT_NAME;
|
|
379
|
+
//# sourceMappingURL=AlertDialog.native.js.map
|
|
@@ -0,0 +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_gui_compose_refs","import_gui_constants","import_gui_core","import_gui_dialog","import_gui_helpers","import_gui_use_controllable_state","React","import_react_native","getAlertDialogScope","scope","ROOT_NAME","TRIGGER_NAME","NativeAlertDialogTriggerFrame","styled","View","styleable","props","forwardedRef","__native","onPress","__onPress","rest","jsx","composeEventHandlers","triggerProps","DialogTrigger","ref","portalProps","DialogPortal","OVERLAY_NAME","AlertDialogOverlayFrame","DialogOverlayFrame","overlayProps","DialogOverlay","CONTENT_NAME","Provider","AlertDialogContextProvider","useStyledContext","useAlertDialogContentContext","createStyledContext","forwardRef","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","AlertDialogTitleFrame","titleProps","DialogTitle","DESCRIPTION_NAME","AlertDialogDescriptionFrame","descriptionProps","DialogDescription","ACTION_NAME","AlertDialogActionFrame","actionProps","DialogClose","CANCEL_NAME","AlertDialogCancelFrame","cancelProps","DESTRUCTIVE_NAME","AlertDialogDestructiveFrame","destructiveProps","param","useEffect","_contentRef_current","hasDescription","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","displayName","cloneElement"],"sources":["../../src/AlertDialog.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAA,CAAwCC,MAAA;AAEjD,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;EAAAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IAEAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IAAA,KACK,IAAAC,IAAA,IAAAD,GAAA,EAYPb,SAAA,CAAAY,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAAA;EACEC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IACA,IAAAF,IAAA,WAAAA,IAAA,uBAAAA,IAAA,gBACA,SAAAG,GAAA,IAAAlB,iBAAA,CAAAe,IAAA,GACA,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,IAAApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,CAAAiB,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;IACA,OAAA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