@react-spectrum/dialog 3.9.7 → 3.10.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.
Files changed (228) hide show
  1. package/dist/import.mjs +5 -7
  2. package/dist/main.js +9 -11
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +5 -7
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +8 -0
  7. package/package.json +12 -43
  8. package/src/index.ts +8 -7
  9. package/dist/AlertDialog.main.js +0 -97
  10. package/dist/AlertDialog.main.js.map +0 -1
  11. package/dist/AlertDialog.mjs +0 -92
  12. package/dist/AlertDialog.module.js +0 -92
  13. package/dist/AlertDialog.module.js.map +0 -1
  14. package/dist/Dialog.main.js +0 -131
  15. package/dist/Dialog.main.js.map +0 -1
  16. package/dist/Dialog.mjs +0 -126
  17. package/dist/Dialog.module.js +0 -126
  18. package/dist/Dialog.module.js.map +0 -1
  19. package/dist/DialogContainer.main.js +0 -63
  20. package/dist/DialogContainer.main.js.map +0 -1
  21. package/dist/DialogContainer.mjs +0 -54
  22. package/dist/DialogContainer.module.js +0 -54
  23. package/dist/DialogContainer.module.js.map +0 -1
  24. package/dist/DialogTrigger.main.js +0 -161
  25. package/dist/DialogTrigger.main.js.map +0 -1
  26. package/dist/DialogTrigger.mjs +0 -152
  27. package/dist/DialogTrigger.module.js +0 -152
  28. package/dist/DialogTrigger.module.js.map +0 -1
  29. package/dist/ar-AE.main.js +0 -7
  30. package/dist/ar-AE.main.js.map +0 -1
  31. package/dist/ar-AE.mjs +0 -9
  32. package/dist/ar-AE.module.js +0 -9
  33. package/dist/ar-AE.module.js.map +0 -1
  34. package/dist/bg-BG.main.js +0 -7
  35. package/dist/bg-BG.main.js.map +0 -1
  36. package/dist/bg-BG.mjs +0 -9
  37. package/dist/bg-BG.module.js +0 -9
  38. package/dist/bg-BG.module.js.map +0 -1
  39. package/dist/context.main.js +0 -27
  40. package/dist/context.main.js.map +0 -1
  41. package/dist/context.mjs +0 -18
  42. package/dist/context.module.js +0 -18
  43. package/dist/context.module.js.map +0 -1
  44. package/dist/cs-CZ.main.js +0 -7
  45. package/dist/cs-CZ.main.js.map +0 -1
  46. package/dist/cs-CZ.mjs +0 -9
  47. package/dist/cs-CZ.module.js +0 -9
  48. package/dist/cs-CZ.module.js.map +0 -1
  49. package/dist/da-DK.main.js +0 -7
  50. package/dist/da-DK.main.js.map +0 -1
  51. package/dist/da-DK.mjs +0 -9
  52. package/dist/da-DK.module.js +0 -9
  53. package/dist/da-DK.module.js.map +0 -1
  54. package/dist/de-DE.main.js +0 -7
  55. package/dist/de-DE.main.js.map +0 -1
  56. package/dist/de-DE.mjs +0 -9
  57. package/dist/de-DE.module.js +0 -9
  58. package/dist/de-DE.module.js.map +0 -1
  59. package/dist/dialog.1f91a33b.css +0 -519
  60. package/dist/dialog.1f91a33b.css.map +0 -1
  61. package/dist/dialog_vars_css.main.js +0 -161
  62. package/dist/dialog_vars_css.main.js.map +0 -1
  63. package/dist/dialog_vars_css.mjs +0 -163
  64. package/dist/dialog_vars_css.module.js +0 -163
  65. package/dist/dialog_vars_css.module.js.map +0 -1
  66. package/dist/el-GR.main.js +0 -7
  67. package/dist/el-GR.main.js.map +0 -1
  68. package/dist/el-GR.mjs +0 -9
  69. package/dist/el-GR.module.js +0 -9
  70. package/dist/el-GR.module.js.map +0 -1
  71. package/dist/en-US.main.js +0 -7
  72. package/dist/en-US.main.js.map +0 -1
  73. package/dist/en-US.mjs +0 -9
  74. package/dist/en-US.module.js +0 -9
  75. package/dist/en-US.module.js.map +0 -1
  76. package/dist/es-ES.main.js +0 -7
  77. package/dist/es-ES.main.js.map +0 -1
  78. package/dist/es-ES.mjs +0 -9
  79. package/dist/es-ES.module.js +0 -9
  80. package/dist/es-ES.module.js.map +0 -1
  81. package/dist/et-EE.main.js +0 -7
  82. package/dist/et-EE.main.js.map +0 -1
  83. package/dist/et-EE.mjs +0 -9
  84. package/dist/et-EE.module.js +0 -9
  85. package/dist/et-EE.module.js.map +0 -1
  86. package/dist/fi-FI.main.js +0 -7
  87. package/dist/fi-FI.main.js.map +0 -1
  88. package/dist/fi-FI.mjs +0 -9
  89. package/dist/fi-FI.module.js +0 -9
  90. package/dist/fi-FI.module.js.map +0 -1
  91. package/dist/fr-FR.main.js +0 -7
  92. package/dist/fr-FR.main.js.map +0 -1
  93. package/dist/fr-FR.mjs +0 -9
  94. package/dist/fr-FR.module.js +0 -9
  95. package/dist/fr-FR.module.js.map +0 -1
  96. package/dist/he-IL.main.js +0 -7
  97. package/dist/he-IL.main.js.map +0 -1
  98. package/dist/he-IL.mjs +0 -9
  99. package/dist/he-IL.module.js +0 -9
  100. package/dist/he-IL.module.js.map +0 -1
  101. package/dist/hr-HR.main.js +0 -7
  102. package/dist/hr-HR.main.js.map +0 -1
  103. package/dist/hr-HR.mjs +0 -9
  104. package/dist/hr-HR.module.js +0 -9
  105. package/dist/hr-HR.module.js.map +0 -1
  106. package/dist/hu-HU.main.js +0 -7
  107. package/dist/hu-HU.main.js.map +0 -1
  108. package/dist/hu-HU.mjs +0 -9
  109. package/dist/hu-HU.module.js +0 -9
  110. package/dist/hu-HU.module.js.map +0 -1
  111. package/dist/intlStrings.main.js +0 -108
  112. package/dist/intlStrings.main.js.map +0 -1
  113. package/dist/intlStrings.mjs +0 -110
  114. package/dist/intlStrings.module.js +0 -110
  115. package/dist/intlStrings.module.js.map +0 -1
  116. package/dist/it-IT.main.js +0 -7
  117. package/dist/it-IT.main.js.map +0 -1
  118. package/dist/it-IT.mjs +0 -9
  119. package/dist/it-IT.module.js +0 -9
  120. package/dist/it-IT.module.js.map +0 -1
  121. package/dist/ja-JP.main.js +0 -7
  122. package/dist/ja-JP.main.js.map +0 -1
  123. package/dist/ja-JP.mjs +0 -9
  124. package/dist/ja-JP.module.js +0 -9
  125. package/dist/ja-JP.module.js.map +0 -1
  126. package/dist/ko-KR.main.js +0 -7
  127. package/dist/ko-KR.main.js.map +0 -1
  128. package/dist/ko-KR.mjs +0 -9
  129. package/dist/ko-KR.module.js +0 -9
  130. package/dist/ko-KR.module.js.map +0 -1
  131. package/dist/lt-LT.main.js +0 -7
  132. package/dist/lt-LT.main.js.map +0 -1
  133. package/dist/lt-LT.mjs +0 -9
  134. package/dist/lt-LT.module.js +0 -9
  135. package/dist/lt-LT.module.js.map +0 -1
  136. package/dist/lv-LV.main.js +0 -7
  137. package/dist/lv-LV.main.js.map +0 -1
  138. package/dist/lv-LV.mjs +0 -9
  139. package/dist/lv-LV.module.js +0 -9
  140. package/dist/lv-LV.module.js.map +0 -1
  141. package/dist/nb-NO.main.js +0 -7
  142. package/dist/nb-NO.main.js.map +0 -1
  143. package/dist/nb-NO.mjs +0 -9
  144. package/dist/nb-NO.module.js +0 -9
  145. package/dist/nb-NO.module.js.map +0 -1
  146. package/dist/nl-NL.main.js +0 -7
  147. package/dist/nl-NL.main.js.map +0 -1
  148. package/dist/nl-NL.mjs +0 -9
  149. package/dist/nl-NL.module.js +0 -9
  150. package/dist/nl-NL.module.js.map +0 -1
  151. package/dist/pl-PL.main.js +0 -7
  152. package/dist/pl-PL.main.js.map +0 -1
  153. package/dist/pl-PL.mjs +0 -9
  154. package/dist/pl-PL.module.js +0 -9
  155. package/dist/pl-PL.module.js.map +0 -1
  156. package/dist/pt-BR.main.js +0 -7
  157. package/dist/pt-BR.main.js.map +0 -1
  158. package/dist/pt-BR.mjs +0 -9
  159. package/dist/pt-BR.module.js +0 -9
  160. package/dist/pt-BR.module.js.map +0 -1
  161. package/dist/pt-PT.main.js +0 -7
  162. package/dist/pt-PT.main.js.map +0 -1
  163. package/dist/pt-PT.mjs +0 -9
  164. package/dist/pt-PT.module.js +0 -9
  165. package/dist/pt-PT.module.js.map +0 -1
  166. package/dist/ro-RO.main.js +0 -7
  167. package/dist/ro-RO.main.js.map +0 -1
  168. package/dist/ro-RO.mjs +0 -9
  169. package/dist/ro-RO.module.js +0 -9
  170. package/dist/ro-RO.module.js.map +0 -1
  171. package/dist/ru-RU.main.js +0 -7
  172. package/dist/ru-RU.main.js.map +0 -1
  173. package/dist/ru-RU.mjs +0 -9
  174. package/dist/ru-RU.module.js +0 -9
  175. package/dist/ru-RU.module.js.map +0 -1
  176. package/dist/sk-SK.main.js +0 -7
  177. package/dist/sk-SK.main.js.map +0 -1
  178. package/dist/sk-SK.mjs +0 -9
  179. package/dist/sk-SK.module.js +0 -9
  180. package/dist/sk-SK.module.js.map +0 -1
  181. package/dist/sl-SI.main.js +0 -7
  182. package/dist/sl-SI.main.js.map +0 -1
  183. package/dist/sl-SI.mjs +0 -9
  184. package/dist/sl-SI.module.js +0 -9
  185. package/dist/sl-SI.module.js.map +0 -1
  186. package/dist/sr-SP.main.js +0 -7
  187. package/dist/sr-SP.main.js.map +0 -1
  188. package/dist/sr-SP.mjs +0 -9
  189. package/dist/sr-SP.module.js +0 -9
  190. package/dist/sr-SP.module.js.map +0 -1
  191. package/dist/sv-SE.main.js +0 -7
  192. package/dist/sv-SE.main.js.map +0 -1
  193. package/dist/sv-SE.mjs +0 -9
  194. package/dist/sv-SE.module.js +0 -9
  195. package/dist/sv-SE.module.js.map +0 -1
  196. package/dist/tr-TR.main.js +0 -7
  197. package/dist/tr-TR.main.js.map +0 -1
  198. package/dist/tr-TR.mjs +0 -9
  199. package/dist/tr-TR.module.js +0 -9
  200. package/dist/tr-TR.module.js.map +0 -1
  201. package/dist/types.d.ts +0 -32
  202. package/dist/types.d.ts.map +0 -1
  203. package/dist/uk-UA.main.js +0 -7
  204. package/dist/uk-UA.main.js.map +0 -1
  205. package/dist/uk-UA.mjs +0 -9
  206. package/dist/uk-UA.module.js +0 -9
  207. package/dist/uk-UA.module.js.map +0 -1
  208. package/dist/useDialogContainer.main.js +0 -34
  209. package/dist/useDialogContainer.main.js.map +0 -1
  210. package/dist/useDialogContainer.mjs +0 -29
  211. package/dist/useDialogContainer.module.js +0 -29
  212. package/dist/useDialogContainer.module.js.map +0 -1
  213. package/dist/zh-CN.main.js +0 -7
  214. package/dist/zh-CN.main.js.map +0 -1
  215. package/dist/zh-CN.mjs +0 -9
  216. package/dist/zh-CN.module.js +0 -9
  217. package/dist/zh-CN.module.js.map +0 -1
  218. package/dist/zh-TW.main.js +0 -7
  219. package/dist/zh-TW.main.js.map +0 -1
  220. package/dist/zh-TW.mjs +0 -9
  221. package/dist/zh-TW.module.js +0 -9
  222. package/dist/zh-TW.module.js.map +0 -1
  223. package/src/AlertDialog.tsx +0 -115
  224. package/src/Dialog.tsx +0 -118
  225. package/src/DialogContainer.tsx +0 -79
  226. package/src/DialogTrigger.tsx +0 -207
  227. package/src/context.ts +0 -21
  228. package/src/useDialogContainer.ts +0 -33
@@ -1,161 +0,0 @@
1
- var $0eb909ad2388d989$exports = require("./context.main.js");
2
- var $7xftW$reactspectrumoverlays = require("@react-spectrum/overlays");
3
- var $7xftW$reactstatelyoverlays = require("@react-stately/overlays");
4
- var $7xftW$reactariainteractions = require("@react-aria/interactions");
5
- var $7xftW$react = require("react");
6
- var $7xftW$reactspectrumutils = require("@react-spectrum/utils");
7
- var $7xftW$reactariaoverlays = require("@react-aria/overlays");
8
-
9
-
10
- function $parcel$interopDefault(a) {
11
- return a && a.__esModule ? a.default : a;
12
- }
13
-
14
- function $parcel$export(e, n, v, s) {
15
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
- }
17
-
18
- $parcel$export(module.exports, "DialogTrigger", () => $46e54a192dc519c9$export$2e1e1122cf0cba88);
19
- /*
20
- * Copyright 2020 Adobe. All rights reserved.
21
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
- * you may not use this file except in compliance with the License. You may obtain a copy
23
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
- *
25
- * Unless required by applicable law or agreed to in writing, software distributed under
26
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
- * OF ANY KIND, either express or implied. See the License for the specific language
28
- * governing permissions and limitations under the License.
29
- */
30
-
31
-
32
-
33
-
34
-
35
-
36
- function $46e54a192dc519c9$var$DialogTrigger(props) {
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
- // if a function is passed as the second child, it won't appear in toArray
40
- let [trigger, content] = children;
41
- // On small devices, show a modal or tray instead of a popover.
42
- let isMobile = (0, $7xftW$reactspectrumutils.useIsMobileDevice)();
43
- if (isMobile) {
44
- // handle cases where desktop popovers need a close button for the mobile modal view
45
- if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
46
- type = mobileType;
47
- }
48
- let state = (0, $7xftW$reactstatelyoverlays.useOverlayTriggerState)(props);
49
- let wasOpen = (0, $7xftW$react.useRef)(false);
50
- (0, $7xftW$react.useEffect)(()=>{
51
- wasOpen.current = state.isOpen;
52
- }, [
53
- state.isOpen
54
- ]);
55
- let isExiting = (0, $7xftW$react.useRef)(false);
56
- let onExiting = ()=>isExiting.current = true;
57
- let onExited = ()=>isExiting.current = false;
58
- (0, $7xftW$react.useEffect)(()=>{
59
- return ()=>{
60
- if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray' && process.env.NODE_ENV !== 'production') 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.');
61
- };
62
- // eslint-disable-next-line react-hooks/exhaustive-deps
63
- }, []);
64
- if (type === 'popover') return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$PopoverTrigger, {
65
- ...positionProps,
66
- state: state,
67
- targetRef: targetRef,
68
- trigger: trigger,
69
- content: content,
70
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
71
- hideArrow: hideArrow
72
- });
73
- let renderOverlay = ()=>{
74
- switch(type){
75
- case 'fullscreen':
76
- case 'fullscreenTakeover':
77
- case 'modal':
78
- return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactspectrumoverlays.Modal), {
79
- state: state,
80
- isDismissable: type === 'modal' ? isDismissable : false,
81
- type: type,
82
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
83
- onExiting: onExiting,
84
- onExited: onExited
85
- }, typeof content === 'function' ? content(state.close) : content);
86
- case 'tray':
87
- return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactspectrumoverlays.Tray), {
88
- state: state,
89
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
90
- }, typeof content === 'function' ? content(state.close) : content);
91
- }
92
- };
93
- return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$DialogTriggerBase, {
94
- type: type,
95
- state: state,
96
- isDismissable: isDismissable,
97
- trigger: trigger,
98
- overlay: renderOverlay()
99
- });
100
- }
101
- // Support DialogTrigger inside components using CollectionBuilder.
102
- $46e54a192dc519c9$var$DialogTrigger.getCollectionNode = function*(props) {
103
- // @ts-ignore - seems like types are wrong. Function children work fine.
104
- let [trigger] = (0, ($parcel$interopDefault($7xftW$react))).Children.toArray(props.children);
105
- let [, content] = props.children;
106
- yield {
107
- element: trigger,
108
- wrapper: (element)=>/*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$DialogTrigger, {
109
- key: element.key,
110
- ...props
111
- }, element, content)
112
- };
113
- };
114
- /**
115
- * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's
116
- * open state with the trigger's press state. Additionally, it allows you to customize the type and
117
- * positioning of the Dialog.
118
- */ // We don't want getCollectionNode to show up in the type definition
119
- let $46e54a192dc519c9$export$2e1e1122cf0cba88 = $46e54a192dc519c9$var$DialogTrigger;
120
- function $46e54a192dc519c9$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
121
- let triggerRef = (0, $7xftW$react.useRef)(null);
122
- let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $7xftW$reactariaoverlays.useOverlayTrigger)({
123
- type: 'dialog'
124
- }, state, triggerRef);
125
- let triggerPropsWithRef = {
126
- ...triggerProps,
127
- ref: targetRef ? undefined : triggerRef
128
- };
129
- let overlay = /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactspectrumoverlays.Popover), {
130
- ...props,
131
- hideArrow: hideArrow,
132
- triggerRef: targetRef || triggerRef,
133
- state: state
134
- }, typeof content === 'function' ? content(state.close) : content);
135
- return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement($46e54a192dc519c9$var$DialogTriggerBase, {
136
- type: "popover",
137
- state: state,
138
- triggerProps: triggerPropsWithRef,
139
- dialogProps: overlayProps,
140
- trigger: trigger,
141
- overlay: overlay
142
- });
143
- }
144
- function $46e54a192dc519c9$var$DialogTriggerBase({ type: type, state: state, isDismissable: isDismissable, dialogProps: dialogProps = {}, triggerProps: triggerProps = {}, overlay: overlay, trigger: trigger }) {
145
- let context = {
146
- type: type,
147
- onClose: state.close,
148
- isDismissable: isDismissable,
149
- ...dialogProps
150
- };
151
- return /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$react.Fragment), null, /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $7xftW$reactariainteractions.PressResponder), {
152
- ...triggerProps,
153
- onPress: state.toggle,
154
- isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
155
- }, trigger), /*#__PURE__*/ (0, ($parcel$interopDefault($7xftW$react))).createElement((0, $0eb909ad2388d989$exports.DialogContext).Provider, {
156
- value: context
157
- }, overlay));
158
- }
159
-
160
-
161
- //# sourceMappingURL=DialogTrigger.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/dialog/src/DialogTrigger.tsx"],"sourcesContent":["/*\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\nimport {DialogContext} from './context';\nimport {Modal, Popover, Tray} from '@react-spectrum/overlays';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {Fragment, JSX, ReactElement, useEffect, useRef} from 'react';\nimport {SpectrumDialogClose, SpectrumDialogProps, SpectrumDialogTriggerProps} from '@react-types/dialog';\nimport {useIsMobileDevice} from '@react-spectrum/utils';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\nfunction DialogTrigger(props: SpectrumDialogTriggerProps) {\n let {\n children,\n type = 'modal',\n mobileType = type === 'popover' ? 'modal' : type,\n hideArrow,\n targetRef,\n isDismissable,\n isKeyboardDismissDisabled,\n ...positionProps\n } = props;\n if (!Array.isArray(children) || children.length > 2) {\n throw new Error('DialogTrigger must have exactly 2 children');\n }\n // if a function is passed as the second child, it won't appear in toArray\n let [trigger, content] = children as [ReactElement, SpectrumDialogClose];\n\n // On small devices, show a modal or tray instead of a popover.\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // handle cases where desktop popovers need a close button for the mobile modal view\n if (type !== 'modal' && mobileType === 'modal') {\n isDismissable = true;\n }\n\n type = mobileType;\n }\n\n let state = useOverlayTriggerState(props);\n let wasOpen = useRef(false);\n useEffect(() => {\n wasOpen.current = state.isOpen;\n }, [state.isOpen]);\n\n let isExiting = useRef(false);\n let onExiting = () => isExiting.current = true;\n let onExited = () => isExiting.current = false;\n\n \n useEffect(() => {\n return () => {\n if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray' && process.env.NODE_ENV !== 'production') {\n 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.');\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (type === 'popover') {\n return (\n <PopoverTrigger\n {...positionProps}\n state={state}\n targetRef={targetRef}\n trigger={trigger}\n content={content}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow} />\n );\n }\n\n let renderOverlay = () => {\n switch (type) {\n case 'fullscreen':\n case 'fullscreenTakeover':\n case 'modal':\n return (\n <Modal\n state={state}\n isDismissable={type === 'modal' ? isDismissable : false}\n type={type}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n onExiting={onExiting}\n onExited={onExited}>\n {typeof content === 'function' ? content(state.close) : content}\n </Modal>\n );\n case 'tray':\n return (\n <Tray\n state={state}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n {typeof content === 'function' ? content(state.close) : content}\n </Tray>\n );\n }\n };\n\n return (\n <DialogTriggerBase\n type={type}\n state={state}\n isDismissable={isDismissable}\n trigger={trigger}\n overlay={renderOverlay()} />\n );\n}\n\n// Support DialogTrigger inside components using CollectionBuilder.\nDialogTrigger.getCollectionNode = function* (props: SpectrumDialogTriggerProps) {\n // @ts-ignore - seems like types are wrong. Function children work fine.\n let [trigger] = React.Children.toArray(props.children);\n let [, content] = props.children as [ReactElement, SpectrumDialogClose];\n yield {\n element: trigger,\n wrapper: (element) => (\n <DialogTrigger key={element.key} {...props}>\n {element}\n {content}\n </DialogTrigger>\n )\n };\n};\n\n/**\n * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's\n * open state with the trigger's press state. Additionally, it allows you to customize the type and\n * positioning of the Dialog.\n */\n\n// We don't want getCollectionNode to show up in the type definition\nlet _DialogTrigger = DialogTrigger as (props: SpectrumDialogTriggerProps) => JSX.Element;\nexport {_DialogTrigger as DialogTrigger};\n\nfunction PopoverTrigger({state, targetRef, trigger, content, hideArrow, ...props}) {\n let triggerRef = useRef<HTMLElement>(null);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'dialog'}, state, triggerRef);\n\n let triggerPropsWithRef = {\n ...triggerProps,\n ref: targetRef ? undefined : triggerRef\n };\n\n let overlay = (\n <Popover\n {...props}\n hideArrow={hideArrow}\n triggerRef={targetRef || triggerRef}\n state={state}>\n {typeof content === 'function' ? content(state.close) : content}\n </Popover>\n );\n\n return (\n <DialogTriggerBase\n type=\"popover\"\n state={state}\n triggerProps={triggerPropsWithRef}\n dialogProps={overlayProps}\n trigger={trigger}\n overlay={overlay} />\n );\n}\n\ninterface SpectrumDialogTriggerBase {\n type: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',\n state: OverlayTriggerState,\n isDismissable?: boolean,\n dialogProps?: SpectrumDialogProps | {},\n triggerProps?: any,\n overlay?: ReactElement,\n trigger: ReactElement\n}\n\nfunction DialogTriggerBase({type, state, isDismissable, dialogProps = {}, triggerProps = {}, overlay, trigger}: SpectrumDialogTriggerBase) {\n let context = {\n type,\n onClose: state.close,\n isDismissable,\n ...dialogProps\n };\n\n return (\n <Fragment>\n <PressResponder\n {...triggerProps}\n onPress={state.toggle}\n isPressed={state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'}>\n {trigger}\n </PressResponder>\n <DialogContext.Provider value={context}>\n {overlay}\n </DialogContext.Provider>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"DialogTrigger.main.js.map"}
@@ -1,152 +0,0 @@
1
- import {DialogContext as $97b119e05830ea0d$export$8b93a07348a7730c} from "./context.mjs";
2
- import {Modal as $jYq0n$Modal, Tray as $jYq0n$Tray, Popover as $jYq0n$Popover} from "@react-spectrum/overlays";
3
- import {useOverlayTriggerState as $jYq0n$useOverlayTriggerState} from "@react-stately/overlays";
4
- import {PressResponder as $jYq0n$PressResponder} from "@react-aria/interactions";
5
- import $jYq0n$react, {useRef as $jYq0n$useRef, useEffect as $jYq0n$useEffect, Fragment as $jYq0n$Fragment} from "react";
6
- import {useIsMobileDevice as $jYq0n$useIsMobileDevice} from "@react-spectrum/utils";
7
- import {useOverlayTrigger as $jYq0n$useOverlayTrigger} from "@react-aria/overlays";
8
-
9
- /*
10
- * Copyright 2020 Adobe. All rights reserved.
11
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License. You may obtain a copy
13
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software distributed under
16
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
- * OF ANY KIND, either express or implied. See the License for the specific language
18
- * governing permissions and limitations under the License.
19
- */
20
-
21
-
22
-
23
-
24
-
25
-
26
- function $c412c5ea680c1e4f$var$DialogTrigger(props) {
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
- // if a function is passed as the second child, it won't appear in toArray
30
- let [trigger, content] = children;
31
- // On small devices, show a modal or tray instead of a popover.
32
- let isMobile = (0, $jYq0n$useIsMobileDevice)();
33
- if (isMobile) {
34
- // handle cases where desktop popovers need a close button for the mobile modal view
35
- if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
36
- type = mobileType;
37
- }
38
- let state = (0, $jYq0n$useOverlayTriggerState)(props);
39
- let wasOpen = (0, $jYq0n$useRef)(false);
40
- (0, $jYq0n$useEffect)(()=>{
41
- wasOpen.current = state.isOpen;
42
- }, [
43
- state.isOpen
44
- ]);
45
- let isExiting = (0, $jYq0n$useRef)(false);
46
- let onExiting = ()=>isExiting.current = true;
47
- let onExited = ()=>isExiting.current = false;
48
- (0, $jYq0n$useEffect)(()=>{
49
- return ()=>{
50
- if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray' && process.env.NODE_ENV !== 'production') 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.');
51
- };
52
- // eslint-disable-next-line react-hooks/exhaustive-deps
53
- }, []);
54
- if (type === 'popover') return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$PopoverTrigger, {
55
- ...positionProps,
56
- state: state,
57
- targetRef: targetRef,
58
- trigger: trigger,
59
- content: content,
60
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
61
- hideArrow: hideArrow
62
- });
63
- let renderOverlay = ()=>{
64
- switch(type){
65
- case 'fullscreen':
66
- case 'fullscreenTakeover':
67
- case 'modal':
68
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Modal), {
69
- state: state,
70
- isDismissable: type === 'modal' ? isDismissable : false,
71
- type: type,
72
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
73
- onExiting: onExiting,
74
- onExited: onExited
75
- }, typeof content === 'function' ? content(state.close) : content);
76
- case 'tray':
77
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Tray), {
78
- state: state,
79
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
80
- }, typeof content === 'function' ? content(state.close) : content);
81
- }
82
- };
83
- return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
84
- type: type,
85
- state: state,
86
- isDismissable: isDismissable,
87
- trigger: trigger,
88
- overlay: renderOverlay()
89
- });
90
- }
91
- // Support DialogTrigger inside components using CollectionBuilder.
92
- $c412c5ea680c1e4f$var$DialogTrigger.getCollectionNode = function*(props) {
93
- // @ts-ignore - seems like types are wrong. Function children work fine.
94
- let [trigger] = (0, $jYq0n$react).Children.toArray(props.children);
95
- let [, content] = props.children;
96
- yield {
97
- element: trigger,
98
- wrapper: (element)=>/*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTrigger, {
99
- key: element.key,
100
- ...props
101
- }, element, content)
102
- };
103
- };
104
- /**
105
- * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's
106
- * open state with the trigger's press state. Additionally, it allows you to customize the type and
107
- * positioning of the Dialog.
108
- */ // We don't want getCollectionNode to show up in the type definition
109
- let $c412c5ea680c1e4f$export$2e1e1122cf0cba88 = $c412c5ea680c1e4f$var$DialogTrigger;
110
- function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
111
- let triggerRef = (0, $jYq0n$useRef)(null);
112
- let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $jYq0n$useOverlayTrigger)({
113
- type: 'dialog'
114
- }, state, triggerRef);
115
- let triggerPropsWithRef = {
116
- ...triggerProps,
117
- ref: targetRef ? undefined : triggerRef
118
- };
119
- let overlay = /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Popover), {
120
- ...props,
121
- hideArrow: hideArrow,
122
- triggerRef: targetRef || triggerRef,
123
- state: state
124
- }, typeof content === 'function' ? content(state.close) : content);
125
- return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
126
- type: "popover",
127
- state: state,
128
- triggerProps: triggerPropsWithRef,
129
- dialogProps: overlayProps,
130
- trigger: trigger,
131
- overlay: overlay
132
- });
133
- }
134
- function $c412c5ea680c1e4f$var$DialogTriggerBase({ type: type, state: state, isDismissable: isDismissable, dialogProps: dialogProps = {}, triggerProps: triggerProps = {}, overlay: overlay, trigger: trigger }) {
135
- let context = {
136
- type: type,
137
- onClose: state.close,
138
- isDismissable: isDismissable,
139
- ...dialogProps
140
- };
141
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Fragment), null, /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$PressResponder), {
142
- ...triggerProps,
143
- onPress: state.toggle,
144
- isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
145
- }, trigger), /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $97b119e05830ea0d$export$8b93a07348a7730c).Provider, {
146
- value: context
147
- }, overlay));
148
- }
149
-
150
-
151
- export {$c412c5ea680c1e4f$export$2e1e1122cf0cba88 as DialogTrigger};
152
- //# sourceMappingURL=DialogTrigger.module.js.map
@@ -1,152 +0,0 @@
1
- import {DialogContext as $97b119e05830ea0d$export$8b93a07348a7730c} from "./context.module.js";
2
- import {Modal as $jYq0n$Modal, Tray as $jYq0n$Tray, Popover as $jYq0n$Popover} from "@react-spectrum/overlays";
3
- import {useOverlayTriggerState as $jYq0n$useOverlayTriggerState} from "@react-stately/overlays";
4
- import {PressResponder as $jYq0n$PressResponder} from "@react-aria/interactions";
5
- import $jYq0n$react, {useRef as $jYq0n$useRef, useEffect as $jYq0n$useEffect, Fragment as $jYq0n$Fragment} from "react";
6
- import {useIsMobileDevice as $jYq0n$useIsMobileDevice} from "@react-spectrum/utils";
7
- import {useOverlayTrigger as $jYq0n$useOverlayTrigger} from "@react-aria/overlays";
8
-
9
- /*
10
- * Copyright 2020 Adobe. All rights reserved.
11
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License. You may obtain a copy
13
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software distributed under
16
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
- * OF ANY KIND, either express or implied. See the License for the specific language
18
- * governing permissions and limitations under the License.
19
- */
20
-
21
-
22
-
23
-
24
-
25
-
26
- function $c412c5ea680c1e4f$var$DialogTrigger(props) {
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
- // if a function is passed as the second child, it won't appear in toArray
30
- let [trigger, content] = children;
31
- // On small devices, show a modal or tray instead of a popover.
32
- let isMobile = (0, $jYq0n$useIsMobileDevice)();
33
- if (isMobile) {
34
- // handle cases where desktop popovers need a close button for the mobile modal view
35
- if (type !== 'modal' && mobileType === 'modal') isDismissable = true;
36
- type = mobileType;
37
- }
38
- let state = (0, $jYq0n$useOverlayTriggerState)(props);
39
- let wasOpen = (0, $jYq0n$useRef)(false);
40
- (0, $jYq0n$useEffect)(()=>{
41
- wasOpen.current = state.isOpen;
42
- }, [
43
- state.isOpen
44
- ]);
45
- let isExiting = (0, $jYq0n$useRef)(false);
46
- let onExiting = ()=>isExiting.current = true;
47
- let onExited = ()=>isExiting.current = false;
48
- (0, $jYq0n$useEffect)(()=>{
49
- return ()=>{
50
- if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray' && process.env.NODE_ENV !== 'production') 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.');
51
- };
52
- // eslint-disable-next-line react-hooks/exhaustive-deps
53
- }, []);
54
- if (type === 'popover') return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$PopoverTrigger, {
55
- ...positionProps,
56
- state: state,
57
- targetRef: targetRef,
58
- trigger: trigger,
59
- content: content,
60
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
61
- hideArrow: hideArrow
62
- });
63
- let renderOverlay = ()=>{
64
- switch(type){
65
- case 'fullscreen':
66
- case 'fullscreenTakeover':
67
- case 'modal':
68
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Modal), {
69
- state: state,
70
- isDismissable: type === 'modal' ? isDismissable : false,
71
- type: type,
72
- isKeyboardDismissDisabled: isKeyboardDismissDisabled,
73
- onExiting: onExiting,
74
- onExited: onExited
75
- }, typeof content === 'function' ? content(state.close) : content);
76
- case 'tray':
77
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Tray), {
78
- state: state,
79
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
80
- }, typeof content === 'function' ? content(state.close) : content);
81
- }
82
- };
83
- return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
84
- type: type,
85
- state: state,
86
- isDismissable: isDismissable,
87
- trigger: trigger,
88
- overlay: renderOverlay()
89
- });
90
- }
91
- // Support DialogTrigger inside components using CollectionBuilder.
92
- $c412c5ea680c1e4f$var$DialogTrigger.getCollectionNode = function*(props) {
93
- // @ts-ignore - seems like types are wrong. Function children work fine.
94
- let [trigger] = (0, $jYq0n$react).Children.toArray(props.children);
95
- let [, content] = props.children;
96
- yield {
97
- element: trigger,
98
- wrapper: (element)=>/*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTrigger, {
99
- key: element.key,
100
- ...props
101
- }, element, content)
102
- };
103
- };
104
- /**
105
- * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's
106
- * open state with the trigger's press state. Additionally, it allows you to customize the type and
107
- * positioning of the Dialog.
108
- */ // We don't want getCollectionNode to show up in the type definition
109
- let $c412c5ea680c1e4f$export$2e1e1122cf0cba88 = $c412c5ea680c1e4f$var$DialogTrigger;
110
- function $c412c5ea680c1e4f$var$PopoverTrigger({ state: state, targetRef: targetRef, trigger: trigger, content: content, hideArrow: hideArrow, ...props }) {
111
- let triggerRef = (0, $jYq0n$useRef)(null);
112
- let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $jYq0n$useOverlayTrigger)({
113
- type: 'dialog'
114
- }, state, triggerRef);
115
- let triggerPropsWithRef = {
116
- ...triggerProps,
117
- ref: targetRef ? undefined : triggerRef
118
- };
119
- let overlay = /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Popover), {
120
- ...props,
121
- hideArrow: hideArrow,
122
- triggerRef: targetRef || triggerRef,
123
- state: state
124
- }, typeof content === 'function' ? content(state.close) : content);
125
- return /*#__PURE__*/ (0, $jYq0n$react).createElement($c412c5ea680c1e4f$var$DialogTriggerBase, {
126
- type: "popover",
127
- state: state,
128
- triggerProps: triggerPropsWithRef,
129
- dialogProps: overlayProps,
130
- trigger: trigger,
131
- overlay: overlay
132
- });
133
- }
134
- function $c412c5ea680c1e4f$var$DialogTriggerBase({ type: type, state: state, isDismissable: isDismissable, dialogProps: dialogProps = {}, triggerProps: triggerProps = {}, overlay: overlay, trigger: trigger }) {
135
- let context = {
136
- type: type,
137
- onClose: state.close,
138
- isDismissable: isDismissable,
139
- ...dialogProps
140
- };
141
- return /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$Fragment), null, /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $jYq0n$PressResponder), {
142
- ...triggerProps,
143
- onPress: state.toggle,
144
- isPressed: state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'
145
- }, trigger), /*#__PURE__*/ (0, $jYq0n$react).createElement((0, $97b119e05830ea0d$export$8b93a07348a7730c).Provider, {
146
- value: context
147
- }, overlay));
148
- }
149
-
150
-
151
- export {$c412c5ea680c1e4f$export$2e1e1122cf0cba88 as DialogTrigger};
152
- //# sourceMappingURL=DialogTrigger.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":"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","sources":["packages/@react-spectrum/dialog/src/DialogTrigger.tsx"],"sourcesContent":["/*\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\nimport {DialogContext} from './context';\nimport {Modal, Popover, Tray} from '@react-spectrum/overlays';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {PressResponder} from '@react-aria/interactions';\nimport React, {Fragment, JSX, ReactElement, useEffect, useRef} from 'react';\nimport {SpectrumDialogClose, SpectrumDialogProps, SpectrumDialogTriggerProps} from '@react-types/dialog';\nimport {useIsMobileDevice} from '@react-spectrum/utils';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\nfunction DialogTrigger(props: SpectrumDialogTriggerProps) {\n let {\n children,\n type = 'modal',\n mobileType = type === 'popover' ? 'modal' : type,\n hideArrow,\n targetRef,\n isDismissable,\n isKeyboardDismissDisabled,\n ...positionProps\n } = props;\n if (!Array.isArray(children) || children.length > 2) {\n throw new Error('DialogTrigger must have exactly 2 children');\n }\n // if a function is passed as the second child, it won't appear in toArray\n let [trigger, content] = children as [ReactElement, SpectrumDialogClose];\n\n // On small devices, show a modal or tray instead of a popover.\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // handle cases where desktop popovers need a close button for the mobile modal view\n if (type !== 'modal' && mobileType === 'modal') {\n isDismissable = true;\n }\n\n type = mobileType;\n }\n\n let state = useOverlayTriggerState(props);\n let wasOpen = useRef(false);\n useEffect(() => {\n wasOpen.current = state.isOpen;\n }, [state.isOpen]);\n\n let isExiting = useRef(false);\n let onExiting = () => isExiting.current = true;\n let onExited = () => isExiting.current = false;\n\n \n useEffect(() => {\n return () => {\n if ((wasOpen.current || isExiting.current) && type !== 'popover' && type !== 'tray' && process.env.NODE_ENV !== 'production') {\n 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.');\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (type === 'popover') {\n return (\n <PopoverTrigger\n {...positionProps}\n state={state}\n targetRef={targetRef}\n trigger={trigger}\n content={content}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow} />\n );\n }\n\n let renderOverlay = () => {\n switch (type) {\n case 'fullscreen':\n case 'fullscreenTakeover':\n case 'modal':\n return (\n <Modal\n state={state}\n isDismissable={type === 'modal' ? isDismissable : false}\n type={type}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n onExiting={onExiting}\n onExited={onExited}>\n {typeof content === 'function' ? content(state.close) : content}\n </Modal>\n );\n case 'tray':\n return (\n <Tray\n state={state}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}>\n {typeof content === 'function' ? content(state.close) : content}\n </Tray>\n );\n }\n };\n\n return (\n <DialogTriggerBase\n type={type}\n state={state}\n isDismissable={isDismissable}\n trigger={trigger}\n overlay={renderOverlay()} />\n );\n}\n\n// Support DialogTrigger inside components using CollectionBuilder.\nDialogTrigger.getCollectionNode = function* (props: SpectrumDialogTriggerProps) {\n // @ts-ignore - seems like types are wrong. Function children work fine.\n let [trigger] = React.Children.toArray(props.children);\n let [, content] = props.children as [ReactElement, SpectrumDialogClose];\n yield {\n element: trigger,\n wrapper: (element) => (\n <DialogTrigger key={element.key} {...props}>\n {element}\n {content}\n </DialogTrigger>\n )\n };\n};\n\n/**\n * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's\n * open state with the trigger's press state. Additionally, it allows you to customize the type and\n * positioning of the Dialog.\n */\n\n// We don't want getCollectionNode to show up in the type definition\nlet _DialogTrigger = DialogTrigger as (props: SpectrumDialogTriggerProps) => JSX.Element;\nexport {_DialogTrigger as DialogTrigger};\n\nfunction PopoverTrigger({state, targetRef, trigger, content, hideArrow, ...props}) {\n let triggerRef = useRef<HTMLElement>(null);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'dialog'}, state, triggerRef);\n\n let triggerPropsWithRef = {\n ...triggerProps,\n ref: targetRef ? undefined : triggerRef\n };\n\n let overlay = (\n <Popover\n {...props}\n hideArrow={hideArrow}\n triggerRef={targetRef || triggerRef}\n state={state}>\n {typeof content === 'function' ? content(state.close) : content}\n </Popover>\n );\n\n return (\n <DialogTriggerBase\n type=\"popover\"\n state={state}\n triggerProps={triggerPropsWithRef}\n dialogProps={overlayProps}\n trigger={trigger}\n overlay={overlay} />\n );\n}\n\ninterface SpectrumDialogTriggerBase {\n type: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',\n state: OverlayTriggerState,\n isDismissable?: boolean,\n dialogProps?: SpectrumDialogProps | {},\n triggerProps?: any,\n overlay?: ReactElement,\n trigger: ReactElement\n}\n\nfunction DialogTriggerBase({type, state, isDismissable, dialogProps = {}, triggerProps = {}, overlay, trigger}: SpectrumDialogTriggerBase) {\n let context = {\n type,\n onClose: state.close,\n isDismissable,\n ...dialogProps\n };\n\n return (\n <Fragment>\n <PressResponder\n {...triggerProps}\n onPress={state.toggle}\n isPressed={state.isOpen && type !== 'modal' && type !== 'fullscreen' && type !== 'fullscreenTakeover'}>\n {trigger}\n </PressResponder>\n <DialogContext.Provider value={context}>\n {overlay}\n </DialogContext.Provider>\n </Fragment>\n );\n}\n"],"names":[],"version":3,"file":"DialogTrigger.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "alert": `\u{62A}\u{646}\u{628}\u{64A}\u{647}`,
3
- "dismiss": `\u{62A}\u{62C}\u{627}\u{647}\u{644}`
4
- };
5
-
6
-
7
- //# sourceMappingURL=ar-AE.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,mCAAK,CAAC;IAClC,WAAW,CAAC,mCAAK,CAAC;AACpB","sources":["packages/@react-spectrum/dialog/intl/ar-AE.json"],"sourcesContent":["{\n \"alert\": \"تنبيه\",\n \"dismiss\": \"تجاهل\"\n}\n"],"names":[],"version":3,"file":"ar-AE.main.js.map"}
package/dist/ar-AE.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $cc8cbf248c4ac933$exports = {};
2
- $cc8cbf248c4ac933$exports = {
3
- "alert": `\u{62A}\u{646}\u{628}\u{64A}\u{647}`,
4
- "dismiss": `\u{62A}\u{62C}\u{627}\u{647}\u{644}`
5
- };
6
-
7
-
8
- export {$cc8cbf248c4ac933$exports as default};
9
- //# sourceMappingURL=ar-AE.module.js.map
@@ -1,9 +0,0 @@
1
- var $cc8cbf248c4ac933$exports = {};
2
- $cc8cbf248c4ac933$exports = {
3
- "alert": `\u{62A}\u{646}\u{628}\u{64A}\u{647}`,
4
- "dismiss": `\u{62A}\u{62C}\u{627}\u{647}\u{644}`
5
- };
6
-
7
-
8
- export {$cc8cbf248c4ac933$exports as default};
9
- //# sourceMappingURL=ar-AE.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,mCAAK,CAAC;IAClC,WAAW,CAAC,mCAAK,CAAC;AACpB","sources":["packages/@react-spectrum/dialog/intl/ar-AE.json"],"sourcesContent":["{\n \"alert\": \"تنبيه\",\n \"dismiss\": \"تجاهل\"\n}\n"],"names":[],"version":3,"file":"ar-AE.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "alert": `\u{421}\u{438}\u{433}\u{43D}\u{430}\u{43B}`,
3
- "dismiss": `\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`
4
- };
5
-
6
-
7
- //# sourceMappingURL=bg-BG.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,SAAS,CAAC,0CAAM,CAAC;IACnC,WAAW,CAAC,sEAAU,CAAC;AACzB","sources":["packages/@react-spectrum/dialog/intl/bg-BG.json"],"sourcesContent":["{\n \"alert\": \"Сигнал\",\n \"dismiss\": \"Отхвърляне\"\n}\n"],"names":[],"version":3,"file":"bg-BG.main.js.map"}
package/dist/bg-BG.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $c23042f930ed2466$exports = {};
2
- $c23042f930ed2466$exports = {
3
- "alert": `\u{421}\u{438}\u{433}\u{43D}\u{430}\u{43B}`,
4
- "dismiss": `\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`
5
- };
6
-
7
-
8
- export {$c23042f930ed2466$exports as default};
9
- //# sourceMappingURL=bg-BG.module.js.map
@@ -1,9 +0,0 @@
1
- var $c23042f930ed2466$exports = {};
2
- $c23042f930ed2466$exports = {
3
- "alert": `\u{421}\u{438}\u{433}\u{43D}\u{430}\u{43B}`,
4
- "dismiss": `\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`
5
- };
6
-
7
-
8
- export {$c23042f930ed2466$exports as default};
9
- //# sourceMappingURL=bg-BG.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,SAAS,CAAC,0CAAM,CAAC;IACnC,WAAW,CAAC,sEAAU,CAAC;AACzB","sources":["packages/@react-spectrum/dialog/intl/bg-BG.json"],"sourcesContent":["{\n \"alert\": \"Сигнал\",\n \"dismiss\": \"Отхвърляне\"\n}\n"],"names":[],"version":3,"file":"bg-BG.module.js.map"}
@@ -1,27 +0,0 @@
1
- var $cxWTH$react = require("react");
2
-
3
-
4
- function $parcel$interopDefault(a) {
5
- return a && a.__esModule ? a.default : a;
6
- }
7
-
8
- function $parcel$export(e, n, v, s) {
9
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
10
- }
11
-
12
- $parcel$export(module.exports, "DialogContext", () => $0eb909ad2388d989$export$8b93a07348a7730c);
13
- /*
14
- * Copyright 2020 Adobe. All rights reserved.
15
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
16
- * you may not use this file except in compliance with the License. You may obtain a copy
17
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * Unless required by applicable law or agreed to in writing, software distributed under
20
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
21
- * OF ANY KIND, either express or implied. See the License for the specific language
22
- * governing permissions and limitations under the License.
23
- */
24
- const $0eb909ad2388d989$export$8b93a07348a7730c = (0, ($parcel$interopDefault($cxWTH$react))).createContext(null);
25
-
26
-
27
- //# sourceMappingURL=context.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAUM,MAAM,4CAAgB,CAAA,GAAA,sCAAI,EAAE,aAAa,CAA4B","sources":["packages/@react-spectrum/dialog/src/context.ts"],"sourcesContent":["/*\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\nimport React, {HTMLAttributes} from 'react';\n\nexport interface DialogContextValue extends HTMLAttributes<HTMLElement> {\n type: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',\n isDismissable?: boolean,\n onClose: () => void\n}\n\nexport const DialogContext = React.createContext<DialogContextValue | null>(null);\n"],"names":[],"version":3,"file":"context.main.js.map"}
package/dist/context.mjs DELETED
@@ -1,18 +0,0 @@
1
- import $45eP0$react from "react";
2
-
3
- /*
4
- * Copyright 2020 Adobe. All rights reserved.
5
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License. You may obtain a copy
7
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software distributed under
10
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
- * OF ANY KIND, either express or implied. See the License for the specific language
12
- * governing permissions and limitations under the License.
13
- */
14
- const $97b119e05830ea0d$export$8b93a07348a7730c = (0, $45eP0$react).createContext(null);
15
-
16
-
17
- export {$97b119e05830ea0d$export$8b93a07348a7730c as DialogContext};
18
- //# sourceMappingURL=context.module.js.map