@hanzogui/alert-dialog 2.0.4 → 2.0.7
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 +6 -6
- package/dist/cjs/AlertDialog.native.js +7 -7
- package/dist/esm/AlertDialog.mjs +5 -5
- package/dist/esm/AlertDialog.native.js +7 -7
- package/dist/jsx/AlertDialog.mjs +5 -5
- package/dist/jsx/AlertDialog.native.js +7 -7
- package/package.json +1 -1
- package/src/AlertDialog.tsx +8 -8
package/dist/cjs/AlertDialog.cjs
CHANGED
|
@@ -43,12 +43,12 @@ __export(AlertDialog_exports, {
|
|
|
43
43
|
AlertDialogTrigger: () => AlertDialogTrigger
|
|
44
44
|
});
|
|
45
45
|
module.exports = __toCommonJS(AlertDialog_exports);
|
|
46
|
-
var import_gui_compose_refs = require("@
|
|
47
|
-
import_gui_constants = require("@
|
|
48
|
-
import_gui_core = require("@
|
|
49
|
-
import_gui_dialog = require("@
|
|
50
|
-
import_gui_helpers = require("@
|
|
51
|
-
import_gui_use_controllable_state = require("@
|
|
46
|
+
var import_gui_compose_refs = require("@hanzogui/compose-refs"),
|
|
47
|
+
import_gui_constants = require("@hanzogui/constants"),
|
|
48
|
+
import_gui_core = require("@hanzogui/core"),
|
|
49
|
+
import_gui_dialog = require("@hanzogui/dialog"),
|
|
50
|
+
import_gui_helpers = require("@hanzogui/helpers"),
|
|
51
|
+
import_gui_use_controllable_state = require("@hanzogui/use-controllable-state"),
|
|
52
52
|
React = __toESM(require("react"), 1),
|
|
53
53
|
import_react_native = require("react-native-web"),
|
|
54
54
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -46,12 +46,12 @@ __export(AlertDialog_exports, {
|
|
|
46
46
|
});
|
|
47
47
|
module.exports = __toCommonJS(AlertDialog_exports);
|
|
48
48
|
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
49
|
-
import_gui_compose_refs = require("@
|
|
50
|
-
import_gui_constants = require("@
|
|
51
|
-
import_gui_core = require("@
|
|
52
|
-
import_gui_dialog = require("@
|
|
53
|
-
import_gui_helpers = require("@
|
|
54
|
-
import_gui_use_controllable_state = require("@
|
|
49
|
+
import_gui_compose_refs = require("@hanzogui/compose-refs"),
|
|
50
|
+
import_gui_constants = require("@hanzogui/constants"),
|
|
51
|
+
import_gui_core = require("@hanzogui/core"),
|
|
52
|
+
import_gui_dialog = require("@hanzogui/dialog"),
|
|
53
|
+
import_gui_helpers = require("@hanzogui/helpers"),
|
|
54
|
+
import_gui_use_controllable_state = require("@hanzogui/use-controllable-state"),
|
|
55
55
|
React = __toESM(require("react"), 1),
|
|
56
56
|
import_react_native = require("react-native"),
|
|
57
57
|
getAlertDialogScope = function (scope) {
|
|
@@ -291,7 +291,7 @@ var AlertDialogPortal = function (props) {
|
|
|
291
291
|
buttons = [];
|
|
292
292
|
return forEachChildDeep(React.Children.toArray(props.children), function (child) {
|
|
293
293
|
if (! /* @__PURE__ */React.isValidElement(child)) return !1;
|
|
294
|
-
var name = (0, import_gui_core.
|
|
294
|
+
var name = (0, import_gui_core.isGuiElement)(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
295
295
|
switch (name) {
|
|
296
296
|
case TRIGGER_NAME:
|
|
297
297
|
return triggerElement = /* @__PURE__ */React.cloneElement(child, {
|
package/dist/esm/AlertDialog.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useComposedRefs } from "@
|
|
2
|
-
import { isWeb } from "@
|
|
3
|
-
import { Slottable, View, createStyledContext, styled } from "@
|
|
4
|
-
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@
|
|
5
|
-
import { composeEventHandlers, withStaticProperties } from "@
|
|
1
|
+
import { useComposedRefs } from "@hanzogui/compose-refs";
|
|
2
|
+
import { isWeb } from "@hanzogui/constants";
|
|
3
|
+
import { Slottable, View, createStyledContext, styled } from "@hanzogui/core";
|
|
4
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@hanzogui/dialog";
|
|
5
|
+
import { composeEventHandlers, withStaticProperties } from "@hanzogui/helpers";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
const getAlertDialogScope = scope => scope,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useComposedRefs } from "@
|
|
3
|
-
import { isWeb, useIsomorphicLayoutEffect } from "@
|
|
4
|
-
import { Slottable, View, createStyledContext,
|
|
5
|
-
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@
|
|
6
|
-
import { composeEventHandlers, withStaticProperties } from "@
|
|
7
|
-
import { useControllableState } from "@
|
|
2
|
+
import { useComposedRefs } from "@hanzogui/compose-refs";
|
|
3
|
+
import { isWeb, useIsomorphicLayoutEffect } from "@hanzogui/constants";
|
|
4
|
+
import { Slottable, View, createStyledContext, isGuiElement, styled } from "@hanzogui/core";
|
|
5
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@hanzogui/dialog";
|
|
6
|
+
import { composeEventHandlers, withStaticProperties } from "@hanzogui/helpers";
|
|
7
|
+
import { useControllableState } from "@hanzogui/use-controllable-state";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { Alert } from "react-native";
|
|
10
10
|
var getAlertDialogScope = function (scope) {
|
|
@@ -244,7 +244,7 @@ var AlertDialogPortal = function (props) {
|
|
|
244
244
|
buttons = [];
|
|
245
245
|
return forEachChildDeep(React.Children.toArray(props.children), function (child) {
|
|
246
246
|
if (! /* @__PURE__ */React.isValidElement(child)) return !1;
|
|
247
|
-
var name =
|
|
247
|
+
var name = isGuiElement(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
248
248
|
switch (name) {
|
|
249
249
|
case TRIGGER_NAME:
|
|
250
250
|
return triggerElement = /* @__PURE__ */React.cloneElement(child, {
|
package/dist/jsx/AlertDialog.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useComposedRefs } from "@
|
|
2
|
-
import { isWeb } from "@
|
|
3
|
-
import { Slottable, View, createStyledContext, styled } from "@
|
|
4
|
-
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@
|
|
5
|
-
import { composeEventHandlers, withStaticProperties } from "@
|
|
1
|
+
import { useComposedRefs } from "@hanzogui/compose-refs";
|
|
2
|
+
import { isWeb } from "@hanzogui/constants";
|
|
3
|
+
import { Slottable, View, createStyledContext, styled } from "@hanzogui/core";
|
|
4
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogOverlayFrame, DialogPortal, DialogTitle, DialogTrigger, DialogWarningProvider } from "@hanzogui/dialog";
|
|
5
|
+
import { composeEventHandlers, withStaticProperties } from "@hanzogui/helpers";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
const getAlertDialogScope = scope => scope,
|
|
@@ -46,12 +46,12 @@ __export(AlertDialog_exports, {
|
|
|
46
46
|
});
|
|
47
47
|
module.exports = __toCommonJS(AlertDialog_exports);
|
|
48
48
|
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
49
|
-
import_gui_compose_refs = require("@
|
|
50
|
-
import_gui_constants = require("@
|
|
51
|
-
import_gui_core = require("@
|
|
52
|
-
import_gui_dialog = require("@
|
|
53
|
-
import_gui_helpers = require("@
|
|
54
|
-
import_gui_use_controllable_state = require("@
|
|
49
|
+
import_gui_compose_refs = require("@hanzogui/compose-refs"),
|
|
50
|
+
import_gui_constants = require("@hanzogui/constants"),
|
|
51
|
+
import_gui_core = require("@hanzogui/core"),
|
|
52
|
+
import_gui_dialog = require("@hanzogui/dialog"),
|
|
53
|
+
import_gui_helpers = require("@hanzogui/helpers"),
|
|
54
|
+
import_gui_use_controllable_state = require("@hanzogui/use-controllable-state"),
|
|
55
55
|
React = __toESM(require("react"), 1),
|
|
56
56
|
import_react_native = require("react-native"),
|
|
57
57
|
getAlertDialogScope = function (scope) {
|
|
@@ -291,7 +291,7 @@ var AlertDialogPortal = function (props) {
|
|
|
291
291
|
buttons = [];
|
|
292
292
|
return forEachChildDeep(React.Children.toArray(props.children), function (child) {
|
|
293
293
|
if (! /* @__PURE__ */React.isValidElement(child)) return !1;
|
|
294
|
-
var name = (0, import_gui_core.
|
|
294
|
+
var name = (0, import_gui_core.isGuiElement)(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
295
295
|
switch (name) {
|
|
296
296
|
case TRIGGER_NAME:
|
|
297
297
|
return triggerElement = /* @__PURE__ */React.cloneElement(child, {
|
package/package.json
CHANGED
package/src/AlertDialog.tsx
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// forked from radix-ui
|
|
2
2
|
// https://github.com/radix-ui/primitives/blob/main/packages/react/alert-dialog/src/AlertDialog.tsx
|
|
3
3
|
|
|
4
|
-
import { useComposedRefs } from '@
|
|
5
|
-
import { isWeb, useIsomorphicLayoutEffect } from '@
|
|
6
|
-
import type { GuiElement } from '@
|
|
4
|
+
import { useComposedRefs } from '@hanzogui/compose-refs'
|
|
5
|
+
import { isWeb, useIsomorphicLayoutEffect } from '@hanzogui/constants'
|
|
6
|
+
import type { GuiElement } from '@hanzogui/core'
|
|
7
7
|
import {
|
|
8
8
|
Slottable,
|
|
9
9
|
View,
|
|
10
10
|
createStyledContext,
|
|
11
11
|
isGuiElement,
|
|
12
12
|
styled,
|
|
13
|
-
} from '@
|
|
13
|
+
} from '@hanzogui/core'
|
|
14
14
|
import type {
|
|
15
15
|
DialogCloseProps,
|
|
16
16
|
DialogContentProps,
|
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
DialogProps,
|
|
22
22
|
DialogTitleProps,
|
|
23
23
|
DialogTriggerProps,
|
|
24
|
-
} from '@
|
|
24
|
+
} from '@hanzogui/dialog'
|
|
25
25
|
import {
|
|
26
26
|
Dialog,
|
|
27
27
|
DialogClose,
|
|
@@ -33,9 +33,9 @@ import {
|
|
|
33
33
|
DialogTitle,
|
|
34
34
|
DialogTrigger,
|
|
35
35
|
DialogWarningProvider,
|
|
36
|
-
} from '@
|
|
37
|
-
import { composeEventHandlers, withStaticProperties } from '@
|
|
38
|
-
import { useControllableState } from '@
|
|
36
|
+
} from '@hanzogui/dialog'
|
|
37
|
+
import { composeEventHandlers, withStaticProperties } from '@hanzogui/helpers'
|
|
38
|
+
import { useControllableState } from '@hanzogui/use-controllable-state'
|
|
39
39
|
import * as React from 'react'
|
|
40
40
|
import { Alert } from 'react-native'
|
|
41
41
|
|