@react-spectrum/dialog 3.8.10 → 3.8.12
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/AlertDialog.main.js +9 -9
- package/dist/AlertDialog.mjs +10 -10
- package/dist/AlertDialog.module.js +9 -9
- package/dist/Dialog.main.js +33 -33
- package/dist/Dialog.mjs +34 -34
- package/dist/Dialog.module.js +33 -33
- package/dist/DialogContainer.main.js +2 -2
- package/dist/DialogContainer.mjs +3 -3
- package/dist/DialogContainer.module.js +2 -2
- package/dist/DialogTrigger.main.js +15 -15
- package/dist/DialogTrigger.mjs +16 -16
- package/dist/DialogTrigger.module.js +15 -15
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/context.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/dialog_vars_css.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useDialogContainer.main.js +1 -1
- package/dist/useDialogContainer.mjs +2 -2
- package/dist/useDialogContainer.module.js +1 -1
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +22 -22
|
@@ -34,15 +34,15 @@ $parcel$export(module.exports, "DialogTrigger", () => $46e54a192dc519c9$export$2
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
function $46e54a192dc519c9$var$DialogTrigger(props) {
|
|
37
|
-
let { children: children, type: type =
|
|
38
|
-
if (!Array.isArray(children) || children.length > 2) throw new Error(
|
|
37
|
+
let { children: children, type: type = 'modal', mobileType: mobileType = type === 'popover' ? 'modal' : type, hideArrow: hideArrow, targetRef: targetRef, isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, ...positionProps } = props;
|
|
38
|
+
if (!Array.isArray(children) || children.length > 2) throw new Error('DialogTrigger must have exactly 2 children');
|
|
39
39
|
// if a function is passed as the second child, it won't appear in toArray
|
|
40
40
|
let [trigger, content] = children;
|
|
41
41
|
// On small devices, show a modal or tray instead of a popover.
|
|
42
42
|
let isMobile = (0, $7xftW$reactspectrumutils.useIsMobileDevice)();
|
|
43
43
|
if (isMobile) {
|
|
44
44
|
// handle cases where desktop popovers need a close button for the mobile modal view
|
|
45
|
-
if (type !==
|
|
45
|
+
if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
|
|
46
46
|
type = mobileType;
|
|
47
47
|
}
|
|
48
48
|
let state = (0, $7xftW$reactstatelyoverlays.useOverlayTriggerState)(props);
|
|
@@ -58,11 +58,11 @@ function $46e54a192dc519c9$var$DialogTrigger(props) {
|
|
|
58
58
|
// eslint-disable-next-line arrow-body-style
|
|
59
59
|
(0, $7xftW$react.useEffect)(()=>{
|
|
60
60
|
return ()=>{
|
|
61
|
-
if ((wasOpen.current || isExiting.current) && type !==
|
|
61
|
+
if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray') console.warn('A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.');
|
|
62
62
|
};
|
|
63
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
64
|
}, []);
|
|
65
|
-
if (type ===
|
|
65
|
+
if (type === 'popover') return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$PopoverTrigger, {
|
|
66
66
|
...positionProps,
|
|
67
67
|
state: state,
|
|
68
68
|
targetRef: targetRef,
|
|
@@ -73,22 +73,22 @@ function $46e54a192dc519c9$var$DialogTrigger(props) {
|
|
|
73
73
|
});
|
|
74
74
|
let renderOverlay = ()=>{
|
|
75
75
|
switch(type){
|
|
76
|
-
case
|
|
77
|
-
case
|
|
78
|
-
case
|
|
76
|
+
case 'fullscreen':
|
|
77
|
+
case 'fullscreenTakeover':
|
|
78
|
+
case 'modal':
|
|
79
79
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactspectrumoverlays.Modal), {
|
|
80
80
|
state: state,
|
|
81
|
-
isDismissable: type ===
|
|
81
|
+
isDismissable: type === 'modal' ? isDismissable : false,
|
|
82
82
|
type: type,
|
|
83
83
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled,
|
|
84
84
|
onExiting: onExiting,
|
|
85
85
|
onExited: onExited
|
|
86
|
-
}, typeof content ===
|
|
87
|
-
case
|
|
86
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
87
|
+
case 'tray':
|
|
88
88
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactspectrumoverlays.Tray), {
|
|
89
89
|
state: state,
|
|
90
90
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled
|
|
91
|
-
}, typeof content ===
|
|
91
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
94
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$DialogTriggerBase, {
|
|
@@ -121,7 +121,7 @@ let $46e54a192dc519c9$export$2e1e1122cf0cba88 = $46e54a192dc519c9$var$DialogTrig
|
|
|
121
121
|
function $46e54a192dc519c9$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
|
|
122
122
|
let triggerRef = (0, $7xftW$react.useRef)(null);
|
|
123
123
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $7xftW$reactariaoverlays.useOverlayTrigger)({
|
|
124
|
-
type:
|
|
124
|
+
type: 'dialog'
|
|
125
125
|
}, state, triggerRef);
|
|
126
126
|
let triggerPropsWithRef = {
|
|
127
127
|
...triggerProps,
|
|
@@ -132,7 +132,7 @@ function $46e54a192dc519c9$var$PopoverTrigger({ state: state, targetRef: targetR
|
|
|
132
132
|
hideArrow: hideArrow,
|
|
133
133
|
triggerRef: targetRef || triggerRef,
|
|
134
134
|
state: state
|
|
135
|
-
}, typeof content ===
|
|
135
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
136
136
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$DialogTriggerBase, {
|
|
137
137
|
type: "popover",
|
|
138
138
|
state: state,
|
|
@@ -152,7 +152,7 @@ function $46e54a192dc519c9$var$DialogTriggerBase({ type: type, state: state, isD
|
|
|
152
152
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$react.Fragment), null, /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactariainteractions.PressResponder), {
|
|
153
153
|
...triggerProps,
|
|
154
154
|
onPress: state.toggle,
|
|
155
|
-
isPressed: state.isOpen && type !==
|
|
155
|
+
isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
|
|
156
156
|
}, trigger), /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $0eb909ad2388d989$exports.DialogContext).Provider, {
|
|
157
157
|
value: context
|
|
158
158
|
}, overlay));
|
package/dist/DialogTrigger.mjs
CHANGED
|
@@ -24,15 +24,15 @@ import {useOverlayTrigger as $jYq0n$useOverlayTrigger} from "@react-aria/overlay
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
27
|
-
let { children: children, type: type =
|
|
28
|
-
if (!Array.isArray(children) || children.length > 2) throw new Error(
|
|
27
|
+
let { children: children, type: type = 'modal', mobileType: mobileType = type === 'popover' ? 'modal' : type, hideArrow: hideArrow, targetRef: targetRef, isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, ...positionProps } = props;
|
|
28
|
+
if (!Array.isArray(children) || children.length > 2) throw new Error('DialogTrigger must have exactly 2 children');
|
|
29
29
|
// if a function is passed as the second child, it won't appear in toArray
|
|
30
30
|
let [trigger, content] = children;
|
|
31
31
|
// On small devices, show a modal or tray instead of a popover.
|
|
32
32
|
let isMobile = (0, $jYq0n$useIsMobileDevice)();
|
|
33
33
|
if (isMobile) {
|
|
34
34
|
// handle cases where desktop popovers need a close button for the mobile modal view
|
|
35
|
-
if (type !==
|
|
35
|
+
if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
|
|
36
36
|
type = mobileType;
|
|
37
37
|
}
|
|
38
38
|
let state = (0, $jYq0n$useOverlayTriggerState)(props);
|
|
@@ -48,11 +48,11 @@ function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
|
48
48
|
// eslint-disable-next-line arrow-body-style
|
|
49
49
|
(0, $jYq0n$useEffect)(()=>{
|
|
50
50
|
return ()=>{
|
|
51
|
-
if ((wasOpen.current || isExiting.current) && type !==
|
|
51
|
+
if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray') console.warn('A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.');
|
|
52
52
|
};
|
|
53
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
54
|
}, []);
|
|
55
|
-
if (type ===
|
|
55
|
+
if (type === 'popover') return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$PopoverTrigger, {
|
|
56
56
|
...positionProps,
|
|
57
57
|
state: state,
|
|
58
58
|
targetRef: targetRef,
|
|
@@ -63,22 +63,22 @@ function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
|
63
63
|
});
|
|
64
64
|
let renderOverlay = ()=>{
|
|
65
65
|
switch(type){
|
|
66
|
-
case
|
|
67
|
-
case
|
|
68
|
-
case
|
|
66
|
+
case 'fullscreen':
|
|
67
|
+
case 'fullscreenTakeover':
|
|
68
|
+
case 'modal':
|
|
69
69
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Modal), {
|
|
70
70
|
state: state,
|
|
71
|
-
isDismissable: type ===
|
|
71
|
+
isDismissable: type === 'modal' ? isDismissable : false,
|
|
72
72
|
type: type,
|
|
73
73
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled,
|
|
74
74
|
onExiting: onExiting,
|
|
75
75
|
onExited: onExited
|
|
76
|
-
}, typeof content ===
|
|
77
|
-
case
|
|
76
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
77
|
+
case 'tray':
|
|
78
78
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Tray), {
|
|
79
79
|
state: state,
|
|
80
80
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled
|
|
81
|
-
}, typeof content ===
|
|
81
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
|
|
@@ -111,7 +111,7 @@ let $c412c5ea680c1e4f$export$2e1e1122cf0cba88 = $c412c5ea680c1e4f$var$DialogTrig
|
|
|
111
111
|
function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
|
|
112
112
|
let triggerRef = (0, $jYq0n$useRef)(null);
|
|
113
113
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $jYq0n$useOverlayTrigger)({
|
|
114
|
-
type:
|
|
114
|
+
type: 'dialog'
|
|
115
115
|
}, state, triggerRef);
|
|
116
116
|
let triggerPropsWithRef = {
|
|
117
117
|
...triggerProps,
|
|
@@ -122,7 +122,7 @@ function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetR
|
|
|
122
122
|
hideArrow: hideArrow,
|
|
123
123
|
triggerRef: targetRef || triggerRef,
|
|
124
124
|
state: state
|
|
125
|
-
}, typeof content ===
|
|
125
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
126
126
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
|
|
127
127
|
type: "popover",
|
|
128
128
|
state: state,
|
|
@@ -142,7 +142,7 @@ function $c412c5ea680c1e4f$var$DialogTriggerBase({ type: type, state: state, isD
|
|
|
142
142
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Fragment), null, /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$PressResponder), {
|
|
143
143
|
...triggerProps,
|
|
144
144
|
onPress: state.toggle,
|
|
145
|
-
isPressed: state.isOpen && type !==
|
|
145
|
+
isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
|
|
146
146
|
}, trigger), /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $97b119e05830ea0d$export$8b93a07348a7730c).Provider, {
|
|
147
147
|
value: context
|
|
148
148
|
}, overlay));
|
|
@@ -150,4 +150,4 @@ function $c412c5ea680c1e4f$var$DialogTriggerBase({ type: type, state: state, isD
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
export {$c412c5ea680c1e4f$export$2e1e1122cf0cba88 as DialogTrigger};
|
|
153
|
-
//# sourceMappingURL=DialogTrigger.
|
|
153
|
+
//# sourceMappingURL=DialogTrigger.module.js.map
|
|
@@ -24,15 +24,15 @@ import {useOverlayTrigger as $jYq0n$useOverlayTrigger} from "@react-aria/overlay
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
27
|
-
let { children: children, type: type =
|
|
28
|
-
if (!Array.isArray(children) || children.length > 2) throw new Error(
|
|
27
|
+
let { children: children, type: type = 'modal', mobileType: mobileType = type === 'popover' ? 'modal' : type, hideArrow: hideArrow, targetRef: targetRef, isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, ...positionProps } = props;
|
|
28
|
+
if (!Array.isArray(children) || children.length > 2) throw new Error('DialogTrigger must have exactly 2 children');
|
|
29
29
|
// if a function is passed as the second child, it won't appear in toArray
|
|
30
30
|
let [trigger, content] = children;
|
|
31
31
|
// On small devices, show a modal or tray instead of a popover.
|
|
32
32
|
let isMobile = (0, $jYq0n$useIsMobileDevice)();
|
|
33
33
|
if (isMobile) {
|
|
34
34
|
// handle cases where desktop popovers need a close button for the mobile modal view
|
|
35
|
-
if (type !==
|
|
35
|
+
if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
|
|
36
36
|
type = mobileType;
|
|
37
37
|
}
|
|
38
38
|
let state = (0, $jYq0n$useOverlayTriggerState)(props);
|
|
@@ -48,11 +48,11 @@ function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
|
48
48
|
// eslint-disable-next-line arrow-body-style
|
|
49
49
|
(0, $jYq0n$useEffect)(()=>{
|
|
50
50
|
return ()=>{
|
|
51
|
-
if ((wasOpen.current || isExiting.current) && type !==
|
|
51
|
+
if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray') console.warn('A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.');
|
|
52
52
|
};
|
|
53
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
54
54
|
}, []);
|
|
55
|
-
if (type ===
|
|
55
|
+
if (type === 'popover') return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$PopoverTrigger, {
|
|
56
56
|
...positionProps,
|
|
57
57
|
state: state,
|
|
58
58
|
targetRef: targetRef,
|
|
@@ -63,22 +63,22 @@ function $c412c5ea680c1e4f$var$DialogTrigger(props) {
|
|
|
63
63
|
});
|
|
64
64
|
let renderOverlay = ()=>{
|
|
65
65
|
switch(type){
|
|
66
|
-
case
|
|
67
|
-
case
|
|
68
|
-
case
|
|
66
|
+
case 'fullscreen':
|
|
67
|
+
case 'fullscreenTakeover':
|
|
68
|
+
case 'modal':
|
|
69
69
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Modal), {
|
|
70
70
|
state: state,
|
|
71
|
-
isDismissable: type ===
|
|
71
|
+
isDismissable: type === 'modal' ? isDismissable : false,
|
|
72
72
|
type: type,
|
|
73
73
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled,
|
|
74
74
|
onExiting: onExiting,
|
|
75
75
|
onExited: onExited
|
|
76
|
-
}, typeof content ===
|
|
77
|
-
case
|
|
76
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
77
|
+
case 'tray':
|
|
78
78
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Tray), {
|
|
79
79
|
state: state,
|
|
80
80
|
isKeyboardDismissDisabled: isKeyboardDismissDisabled
|
|
81
|
-
}, typeof content ===
|
|
81
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
|
|
@@ -111,7 +111,7 @@ let $c412c5ea680c1e4f$export$2e1e1122cf0cba88 = $c412c5ea680c1e4f$var$DialogTrig
|
|
|
111
111
|
function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
|
|
112
112
|
let triggerRef = (0, $jYq0n$useRef)(null);
|
|
113
113
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $jYq0n$useOverlayTrigger)({
|
|
114
|
-
type:
|
|
114
|
+
type: 'dialog'
|
|
115
115
|
}, state, triggerRef);
|
|
116
116
|
let triggerPropsWithRef = {
|
|
117
117
|
...triggerProps,
|
|
@@ -122,7 +122,7 @@ function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetR
|
|
|
122
122
|
hideArrow: hideArrow,
|
|
123
123
|
triggerRef: targetRef || triggerRef,
|
|
124
124
|
state: state
|
|
125
|
-
}, typeof content ===
|
|
125
|
+
}, typeof content === 'function' ? content(state.close) : content);
|
|
126
126
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
|
|
127
127
|
type: "popover",
|
|
128
128
|
state: state,
|
|
@@ -142,7 +142,7 @@ function $c412c5ea680c1e4f$var$DialogTriggerBase({ type: type, state: state, isD
|
|
|
142
142
|
return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Fragment), null, /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$PressResponder), {
|
|
143
143
|
...triggerProps,
|
|
144
144
|
onPress: state.toggle,
|
|
145
|
-
isPressed: state.isOpen && type !==
|
|
145
|
+
isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
|
|
146
146
|
}, trigger), /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $97b119e05830ea0d$export$8b93a07348a7730c).Provider, {
|
|
147
147
|
value: context
|
|
148
148
|
}, overlay));
|
package/dist/ar-AE.mjs
CHANGED
package/dist/bg-BG.mjs
CHANGED
package/dist/context.mjs
CHANGED
package/dist/cs-CZ.mjs
CHANGED
package/dist/da-DK.mjs
CHANGED
package/dist/de-DE.mjs
CHANGED
package/dist/dialog_vars_css.mjs
CHANGED
package/dist/el-GR.mjs
CHANGED
package/dist/en-US.mjs
CHANGED
package/dist/es-ES.mjs
CHANGED
package/dist/et-EE.mjs
CHANGED
package/dist/fi-FI.mjs
CHANGED
package/dist/fr-FR.mjs
CHANGED
package/dist/he-IL.mjs
CHANGED
package/dist/hr-HR.mjs
CHANGED
package/dist/hu-HU.mjs
CHANGED
package/dist/intlStrings.mjs
CHANGED
package/dist/it-IT.mjs
CHANGED
package/dist/ja-JP.mjs
CHANGED
package/dist/ko-KR.mjs
CHANGED
package/dist/lt-LT.mjs
CHANGED
package/dist/lv-LV.mjs
CHANGED
package/dist/nb-NO.mjs
CHANGED
package/dist/nl-NL.mjs
CHANGED
package/dist/pl-PL.mjs
CHANGED
package/dist/pt-BR.mjs
CHANGED
package/dist/pt-PT.mjs
CHANGED
package/dist/ro-RO.mjs
CHANGED
package/dist/ru-RU.mjs
CHANGED
package/dist/sk-SK.mjs
CHANGED
package/dist/sl-SI.mjs
CHANGED
package/dist/sr-SP.mjs
CHANGED
package/dist/sv-SE.mjs
CHANGED
package/dist/tr-TR.mjs
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;ACmHA;;;GAGG;AACH,OAAA,IAAI,4GAAkC,CAAC;ACPvC;;GAEG;AACH,OAAA,IAAI,sHAAsC,CAAC;ACoB3C;;;;GAIG;AAGH,OAAA,IAAI,
|
|
1
|
+
{"mappings":";;;ACmHA;;;GAGG;AACH,OAAA,IAAI,4GAAkC,CAAC;ACPvC;;GAEG;AACH,OAAA,IAAI,sHAAsC,CAAC;ACoB3C;;;;GAIG;AAGH,OAAA,IAAI,eAAkC,CAAC,KAAK,EAAE,0BAA0B,KAAK,IAAI,OAAO,CAAC;AC5HzF;;;;GAIG;AACH,gCAAgC,KAAK,EAAE,4BAA4B,qBAuDlE;AC/DD;IACE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,oBAAoB,CAAC;IACzE,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,sCAAsC,oBAAoB,CAYzD;ACZD,YAAY,EAAC,wBAAwB,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,0BAA0B,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/context.ts","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/Dialog.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/AlertDialog.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/DialogTrigger.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/DialogContainer.tsx","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/useDialogContainer.ts","packages/@react-spectrum/dialog/src/packages/@react-spectrum/dialog/src/index.ts","packages/@react-spectrum/dialog/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {AlertDialog} from './AlertDialog';\nexport {Dialog} from './Dialog';\nexport {DialogTrigger} from './DialogTrigger';\nexport {DialogContainer} from './DialogContainer';\nexport {useDialogContainer} from './useDialogContainer';\n\nexport type {SpectrumAlertDialogProps, SpectrumDialogProps, SpectrumDialogContainerProps, SpectrumDialogTriggerProps} from '@react-types/dialog';\nexport type {DialogContainerValue} from './useDialogContainer';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/dist/uk-UA.mjs
CHANGED
|
@@ -21,7 +21,7 @@ $parcel$export(module.exports, "useDialogContainer", () => $1f05ce3abe26c4cc$exp
|
|
|
21
21
|
|
|
22
22
|
function $1f05ce3abe26c4cc$export$a2f2d8fa6720dab1() {
|
|
23
23
|
let context = (0, $9DI8Y$react.useContext)((0, $0eb909ad2388d989$exports.DialogContext));
|
|
24
|
-
if (!context) throw new Error(
|
|
24
|
+
if (!context) throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');
|
|
25
25
|
return {
|
|
26
26
|
type: context.type,
|
|
27
27
|
dismiss () {
|
|
@@ -15,7 +15,7 @@ import {useContext as $8u5hv$useContext} from "react";
|
|
|
15
15
|
|
|
16
16
|
function $faffee7da30e8f89$export$a2f2d8fa6720dab1() {
|
|
17
17
|
let context = (0, $8u5hv$useContext)((0, $97b119e05830ea0d$export$8b93a07348a7730c));
|
|
18
|
-
if (!context) throw new Error(
|
|
18
|
+
if (!context) throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');
|
|
19
19
|
return {
|
|
20
20
|
type: context.type,
|
|
21
21
|
dismiss () {
|
|
@@ -26,4 +26,4 @@ function $faffee7da30e8f89$export$a2f2d8fa6720dab1() {
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
export {$faffee7da30e8f89$export$a2f2d8fa6720dab1 as useDialogContainer};
|
|
29
|
-
//# sourceMappingURL=useDialogContainer.
|
|
29
|
+
//# sourceMappingURL=useDialogContainer.module.js.map
|
|
@@ -15,7 +15,7 @@ import {useContext as $8u5hv$useContext} from "react";
|
|
|
15
15
|
|
|
16
16
|
function $faffee7da30e8f89$export$a2f2d8fa6720dab1() {
|
|
17
17
|
let context = (0, $8u5hv$useContext)((0, $97b119e05830ea0d$export$8b93a07348a7730c));
|
|
18
|
-
if (!context) throw new Error(
|
|
18
|
+
if (!context) throw new Error('Cannot call useDialogContext outside a <DialogTrigger> or <DialogContainer>.');
|
|
19
19
|
return {
|
|
20
20
|
type: context.type,
|
|
21
21
|
dismiss () {
|
package/dist/zh-CN.mjs
CHANGED
package/dist/zh-TW.mjs
CHANGED