@react-aria/dialog 3.1.5 → 3.1.8

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/main.js CHANGED
@@ -1,6 +1,6 @@
1
- var $4W3vU$reactariautils = require("@react-aria/utils");
2
- var $4W3vU$reactariafocus = require("@react-aria/focus");
3
- var $4W3vU$react = require("react");
1
+ var $6vrKB$reactariautils = require("@react-aria/utils");
2
+ var $6vrKB$reactariafocus = require("@react-aria/focus");
3
+ var $6vrKB$react = require("react");
4
4
 
5
5
  function $parcel$exportWildcard(dest, source) {
6
6
  Object.keys(source).forEach(function(key) {
@@ -21,27 +21,27 @@ function $parcel$exportWildcard(dest, source) {
21
21
  function $parcel$export(e, n, v, s) {
22
22
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
23
  }
24
- var $e609ede64ac719d3$exports = {};
24
+ var $e7b76b4fae4e4c55$exports = {};
25
25
 
26
- $parcel$export($e609ede64ac719d3$exports, "useDialog", () => $e609ede64ac719d3$export$d55e7ee900f34e93);
26
+ $parcel$export($e7b76b4fae4e4c55$exports, "useDialog", () => $e7b76b4fae4e4c55$export$d55e7ee900f34e93);
27
27
 
28
28
 
29
29
 
30
- function $e609ede64ac719d3$export$d55e7ee900f34e93(props, ref) {
30
+ function $e7b76b4fae4e4c55$export$d55e7ee900f34e93(props, ref) {
31
31
  let { role: role = 'dialog' } = props;
32
- let titleId = $4W3vU$reactariautils.useSlotId();
32
+ let titleId = $6vrKB$reactariautils.useSlotId();
33
33
  titleId = props['aria-label'] ? undefined : titleId;
34
34
  // Focus the dialog itself on mount, unless a child element is already focused.
35
- $4W3vU$react.useEffect(()=>{
35
+ $6vrKB$react.useEffect(()=>{
36
36
  if (ref.current && !ref.current.contains(document.activeElement)) {
37
- $4W3vU$reactariafocus.focusSafely(ref.current);
37
+ $6vrKB$reactariafocus.focusSafely(ref.current);
38
38
  // Safari on iOS does not move the VoiceOver cursor to the dialog
39
39
  // or announce that it has opened until it has rendered. A workaround
40
40
  // is to wait for half a second, then blur and re-focus the dialog.
41
41
  let timeout = setTimeout(()=>{
42
42
  if (document.activeElement === ref.current) {
43
43
  ref.current.blur();
44
- $4W3vU$reactariafocus.focusSafely(ref.current);
44
+ $6vrKB$reactariafocus.focusSafely(ref.current);
45
45
  }
46
46
  }, 500);
47
47
  return ()=>{
@@ -58,7 +58,7 @@ function $e609ede64ac719d3$export$d55e7ee900f34e93(props, ref) {
58
58
  // even without aria-modal on the dialog itself.
59
59
  return {
60
60
  dialogProps: {
61
- ...$4W3vU$reactariautils.filterDOMProps(props, {
61
+ ...$6vrKB$reactariautils.filterDOMProps(props, {
62
62
  labelable: true
63
63
  }),
64
64
  role: role,
@@ -72,7 +72,7 @@ function $e609ede64ac719d3$export$d55e7ee900f34e93(props, ref) {
72
72
  }
73
73
 
74
74
 
75
- $parcel$exportWildcard(module.exports, $e609ede64ac719d3$exports);
75
+ $parcel$exportWildcard(module.exports, $e7b76b4fae4e4c55$exports);
76
76
 
77
77
 
78
78
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,31 +1,31 @@
1
- import {useSlotId as $9ZlWX$useSlotId, filterDOMProps as $9ZlWX$filterDOMProps} from "@react-aria/utils";
2
- import {focusSafely as $9ZlWX$focusSafely} from "@react-aria/focus";
3
- import {useEffect as $9ZlWX$useEffect} from "react";
1
+ import {useSlotId as $m1DSs$useSlotId, filterDOMProps as $m1DSs$filterDOMProps} from "@react-aria/utils";
2
+ import {focusSafely as $m1DSs$focusSafely} from "@react-aria/focus";
3
+ import {useEffect as $m1DSs$useEffect} from "react";
4
4
 
5
5
  function $parcel$export(e, n, v, s) {
6
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
7
  }
8
- var $774ddb84763e16d9$exports = {};
8
+ var $40df3f8667284809$exports = {};
9
9
 
10
- $parcel$export($774ddb84763e16d9$exports, "useDialog", () => $774ddb84763e16d9$export$d55e7ee900f34e93);
10
+ $parcel$export($40df3f8667284809$exports, "useDialog", () => $40df3f8667284809$export$d55e7ee900f34e93);
11
11
 
12
12
 
13
13
 
14
- function $774ddb84763e16d9$export$d55e7ee900f34e93(props, ref) {
14
+ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
15
15
  let { role: role = 'dialog' } = props;
16
- let titleId = $9ZlWX$useSlotId();
16
+ let titleId = $m1DSs$useSlotId();
17
17
  titleId = props['aria-label'] ? undefined : titleId;
18
18
  // Focus the dialog itself on mount, unless a child element is already focused.
19
- $9ZlWX$useEffect(()=>{
19
+ $m1DSs$useEffect(()=>{
20
20
  if (ref.current && !ref.current.contains(document.activeElement)) {
21
- $9ZlWX$focusSafely(ref.current);
21
+ $m1DSs$focusSafely(ref.current);
22
22
  // Safari on iOS does not move the VoiceOver cursor to the dialog
23
23
  // or announce that it has opened until it has rendered. A workaround
24
24
  // is to wait for half a second, then blur and re-focus the dialog.
25
25
  let timeout = setTimeout(()=>{
26
26
  if (document.activeElement === ref.current) {
27
27
  ref.current.blur();
28
- $9ZlWX$focusSafely(ref.current);
28
+ $m1DSs$focusSafely(ref.current);
29
29
  }
30
30
  }, 500);
31
31
  return ()=>{
@@ -42,7 +42,7 @@ function $774ddb84763e16d9$export$d55e7ee900f34e93(props, ref) {
42
42
  // even without aria-modal on the dialog itself.
43
43
  return {
44
44
  dialogProps: {
45
- ...$9ZlWX$filterDOMProps(props, {
45
+ ...$m1DSs$filterDOMProps(props, {
46
46
  labelable: true
47
47
  }),
48
48
  role: role,
@@ -58,5 +58,5 @@ function $774ddb84763e16d9$export$d55e7ee900f34e93(props, ref) {
58
58
 
59
59
 
60
60
 
61
- export {$774ddb84763e16d9$export$d55e7ee900f34e93 as useDialog};
61
+ export {$40df3f8667284809$export$d55e7ee900f34e93 as useDialog};
62
62
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/dialog",
3
- "version": "3.1.5",
3
+ "version": "3.1.8",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -21,13 +21,13 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/runtime": "^7.6.2",
24
- "@react-aria/focus": "^3.5.1",
25
- "@react-aria/utils": "^3.11.1",
26
- "@react-stately/overlays": "^3.1.4",
27
- "@react-types/dialog": "^3.3.2"
24
+ "@react-aria/focus": "^3.5.4",
25
+ "@react-aria/utils": "^3.11.3",
26
+ "@react-stately/overlays": "^3.1.6",
27
+ "@react-types/dialog": "^3.3.4"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
32
+ "gitHead": "e7708349a637642a30d33a11ca4a75ad5829eaa3"
33
33
  }