@react-aria/utils
Advanced tools
Comparing version 3.24.0 to 3.24.1
@@ -21,3 +21,3 @@ | ||
return (...args)=>{ | ||
for (let callback of callbacks)if (typeof callback === "function") callback(...args); | ||
for (let callback of callbacks)if (typeof callback === 'function') callback(...args); | ||
}; | ||
@@ -24,0 +24,0 @@ } |
@@ -15,3 +15,3 @@ /* | ||
return (...args)=>{ | ||
for (let callback of callbacks)if (typeof callback === "function") callback(...args); | ||
for (let callback of callbacks)if (typeof callback === 'function') callback(...args); | ||
}; | ||
@@ -18,0 +18,0 @@ } |
@@ -13,3 +13,3 @@ | ||
const $aaa611146751592e$export$f21a1ffae260145a = (el)=>{ | ||
if (el && "window" in el && el.window === el) return el; | ||
if (el && 'window' in el && el.window === el) return el; | ||
const doc = $aaa611146751592e$export$b204af158042fbac(el); | ||
@@ -16,0 +16,0 @@ return doc.defaultView || window; |
@@ -6,3 +6,3 @@ const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{ | ||
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{ | ||
if (el && "window" in el && el.window === el) return el; | ||
if (el && 'window' in el && el.window === el) return el; | ||
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el); | ||
@@ -9,0 +9,0 @@ return doc.defaultView || window; |
@@ -18,19 +18,19 @@ | ||
*/ const $8d15d0e1797d4238$var$DOMPropNames = new Set([ | ||
"id" | ||
'id' | ||
]); | ||
const $8d15d0e1797d4238$var$labelablePropNames = new Set([ | ||
"aria-label", | ||
"aria-labelledby", | ||
"aria-describedby", | ||
"aria-details" | ||
'aria-label', | ||
'aria-labelledby', | ||
'aria-describedby', | ||
'aria-details' | ||
]); | ||
// See LinkDOMProps in dom.d.ts. | ||
const $8d15d0e1797d4238$var$linkPropNames = new Set([ | ||
"href", | ||
"hrefLang", | ||
"target", | ||
"rel", | ||
"download", | ||
"ping", | ||
"referrerPolicy" | ||
'href', | ||
'hrefLang', | ||
'target', | ||
'rel', | ||
'download', | ||
'ping', | ||
'referrerPolicy' | ||
]); | ||
@@ -37,0 +37,0 @@ const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/; |
@@ -12,19 +12,19 @@ /* | ||
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([ | ||
"id" | ||
'id' | ||
]); | ||
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([ | ||
"aria-label", | ||
"aria-labelledby", | ||
"aria-describedby", | ||
"aria-details" | ||
'aria-label', | ||
'aria-labelledby', | ||
'aria-describedby', | ||
'aria-details' | ||
]); | ||
// See LinkDOMProps in dom.d.ts. | ||
const $65484d02dcb7eb3e$var$linkPropNames = new Set([ | ||
"href", | ||
"hrefLang", | ||
"target", | ||
"rel", | ||
"download", | ||
"ping", | ||
"referrerPolicy" | ||
'href', | ||
'hrefLang', | ||
'target', | ||
'rel', | ||
'download', | ||
'ping', | ||
'referrerPolicy' | ||
]); | ||
@@ -31,0 +31,0 @@ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/; |
@@ -32,3 +32,3 @@ | ||
try { | ||
let focusElem = document.createElement("div"); | ||
let focusElem = document.createElement('div'); | ||
focusElem.focus({ | ||
@@ -35,0 +35,0 @@ get preventScroll () { |
@@ -26,3 +26,3 @@ /* | ||
try { | ||
let focusElem = document.createElement("div"); | ||
let focusElem = document.createElement('div'); | ||
focusElem.focus({ | ||
@@ -29,0 +29,0 @@ get preventScroll () { |
@@ -17,6 +17,6 @@ | ||
* governing permissions and limitations under the License. | ||
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") { | ||
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation = 'horizontal') { | ||
let rect = element.getBoundingClientRect(); | ||
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom; | ||
return orientation === "horizontal" ? rect.left : rect.top; | ||
if (reverse) return orientation === 'horizontal' ? rect.right : rect.bottom; | ||
return orientation === 'horizontal' ? rect.left : rect.top; | ||
} | ||
@@ -23,0 +23,0 @@ |
@@ -11,6 +11,6 @@ /* | ||
* governing permissions and limitations under the License. | ||
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") { | ||
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = 'horizontal') { | ||
let rect = element.getBoundingClientRect(); | ||
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom; | ||
return orientation === "horizontal" ? rect.left : rect.top; | ||
if (reverse) return orientation === 'horizontal' ? rect.right : rect.bottom; | ||
return orientation === 'horizontal' ? rect.left : rect.top; | ||
} | ||
@@ -17,0 +17,0 @@ |
@@ -27,3 +27,3 @@ var $9e20cff0af27e8cc$exports = require("./platform.main.js"); | ||
// to detect TalkBack virtual clicks. | ||
if ((0, $9e20cff0af27e8cc$exports.isAndroid)() && event.pointerType) return event.type === "click" && event.buttons === 1; | ||
if ((0, $9e20cff0af27e8cc$exports.isAndroid)() && event.pointerType) return event.type === 'click' && event.buttons === 1; | ||
return event.detail === 0 && !event.pointerType; | ||
@@ -38,3 +38,3 @@ } | ||
// Talkback double tap from Windows Firefox touch screen press | ||
return !(0, $9e20cff0af27e8cc$exports.isAndroid)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse"; | ||
return !(0, $9e20cff0af27e8cc$exports.isAndroid)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse'; | ||
} | ||
@@ -41,0 +41,0 @@ |
@@ -20,3 +20,3 @@ import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8} from "./platform.module.js"; | ||
// to detect TalkBack virtual clicks. | ||
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === "click" && event.buttons === 1; | ||
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1; | ||
return event.detail === 0 && !event.pointerType; | ||
@@ -31,3 +31,3 @@ } | ||
// Talkback double tap from Windows Firefox touch screen press | ||
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse"; | ||
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse'; | ||
} | ||
@@ -34,0 +34,0 @@ |
@@ -40,6 +40,6 @@ var $1e2191638e54f613$exports = require("./chain.main.js"); | ||
// Chain events | ||
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex. | ||
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$exports.chain)(a, b); | ||
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = (0, ($parcel$interopDefault($eVrjB$clsx)))(a, b); | ||
else if (key === "id" && a && b) result.id = (0, $8c61827343eed941$exports.mergeIds)(a, b); | ||
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex. | ||
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$exports.chain)(a, b); | ||
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, ($parcel$interopDefault($eVrjB$clsx)))(a, b); | ||
else if (key === 'id' && a && b) result.id = (0, $8c61827343eed941$exports.mergeIds)(a, b); | ||
else result[key] = b !== undefined ? b : a; | ||
@@ -46,0 +46,0 @@ } |
@@ -30,6 +30,6 @@ import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.module.js"; | ||
// Chain events | ||
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex. | ||
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b); | ||
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = (0, $7jXr9$clsx)(a, b); | ||
else if (key === "id" && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b); | ||
if (typeof a === 'function' && typeof b === 'function' && // This is a lot faster than a regex. | ||
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b); | ||
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, $7jXr9$clsx)(a, b); | ||
else if (key === 'id' && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b); | ||
else result[key] = b !== undefined ? b : a; | ||
@@ -36,0 +36,0 @@ } |
@@ -21,3 +21,3 @@ | ||
for (let ref of refs){ | ||
if (typeof ref === "function") ref(value); | ||
if (typeof ref === 'function') ref(value); | ||
else if (ref != null) ref.current = value; | ||
@@ -24,0 +24,0 @@ } |
@@ -15,3 +15,3 @@ /* | ||
for (let ref of refs){ | ||
if (typeof ref === "function") ref(value); | ||
if (typeof ref === 'function') ref(value); | ||
else if (ref != null) ref.current = value; | ||
@@ -18,0 +18,0 @@ } |
@@ -62,4 +62,4 @@ var $1117b6c0d4c4c164$exports = require("./focusWithoutScrolling.main.js"); | ||
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe. | ||
let target = link.getAttribute("target"); | ||
return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac) | ||
let target = link.getAttribute('target'); | ||
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac) | ||
!modifiers.ctrlKey && // open in new tab (windows) | ||
@@ -76,3 +76,3 @@ !modifiers.altKey && // download | ||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640. | ||
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") { | ||
if ((0, $9e20cff0af27e8cc$exports.isFirefox)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') { | ||
if ((0, $9e20cff0af27e8cc$exports.isMac)()) metaKey = true; | ||
@@ -83,4 +83,4 @@ else ctrlKey = true; | ||
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184 | ||
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && true ? new KeyboardEvent("keydown", { | ||
keyIdentifier: "Enter", | ||
let event = (0, $9e20cff0af27e8cc$exports.isWebKit)() && (0, $9e20cff0af27e8cc$exports.isMac)() && !(0, $9e20cff0af27e8cc$exports.isIPad)() && true ? new KeyboardEvent('keydown', { | ||
keyIdentifier: 'Enter', | ||
metaKey: metaKey, | ||
@@ -90,3 +90,3 @@ ctrlKey: ctrlKey, | ||
shiftKey: shiftKey | ||
}) : new MouseEvent("click", { | ||
}) : new MouseEvent('click', { | ||
metaKey: metaKey, | ||
@@ -108,10 +108,10 @@ ctrlKey: ctrlKey, | ||
if (target instanceof HTMLAnchorElement) open(target); | ||
else if (target.hasAttribute("data-href")) { | ||
let link = document.createElement("a"); | ||
link.href = target.getAttribute("data-href"); | ||
if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target"); | ||
if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel"); | ||
if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download"); | ||
if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping"); | ||
if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy"); | ||
else if (target.hasAttribute('data-href')) { | ||
let link = document.createElement('a'); | ||
link.href = target.getAttribute('data-href'); | ||
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target'); | ||
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel'); | ||
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download'); | ||
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping'); | ||
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy'); | ||
target.appendChild(link); | ||
@@ -127,8 +127,8 @@ open(link); | ||
return { | ||
"data-href": props.href, | ||
"data-target": props.target, | ||
"data-rel": props.rel, | ||
"data-download": props.download, | ||
"data-ping": props.ping, | ||
"data-referrer-policy": props.referrerPolicy | ||
'data-href': props.href, | ||
'data-target': props.target, | ||
'data-rel': props.rel, | ||
'data-download': props.download, | ||
'data-ping': props.ping, | ||
'data-referrer-policy': props.referrerPolicy | ||
}; | ||
@@ -135,0 +135,0 @@ } |
@@ -47,4 +47,4 @@ import {focusWithoutScrolling as $7215afc6de606d6b$export$de79e2c695e052f3} from "./focusWithoutScrolling.module.js"; | ||
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe. | ||
let target = link.getAttribute("target"); | ||
return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac) | ||
let target = link.getAttribute('target'); | ||
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac) | ||
!modifiers.ctrlKey && // open in new tab (windows) | ||
@@ -61,3 +61,3 @@ !modifiers.altKey && // download | ||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640. | ||
if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") { | ||
if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') { | ||
if ((0, $c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true; | ||
@@ -68,4 +68,4 @@ else ctrlKey = true; | ||
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184 | ||
let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", { | ||
keyIdentifier: "Enter", | ||
let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent('keydown', { | ||
keyIdentifier: 'Enter', | ||
metaKey: metaKey, | ||
@@ -75,3 +75,3 @@ ctrlKey: ctrlKey, | ||
shiftKey: shiftKey | ||
}) : new MouseEvent("click", { | ||
}) : new MouseEvent('click', { | ||
metaKey: metaKey, | ||
@@ -93,10 +93,10 @@ ctrlKey: ctrlKey, | ||
if (target instanceof HTMLAnchorElement) open(target); | ||
else if (target.hasAttribute("data-href")) { | ||
let link = document.createElement("a"); | ||
link.href = target.getAttribute("data-href"); | ||
if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target"); | ||
if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel"); | ||
if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download"); | ||
if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping"); | ||
if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy"); | ||
else if (target.hasAttribute('data-href')) { | ||
let link = document.createElement('a'); | ||
link.href = target.getAttribute('data-href'); | ||
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target'); | ||
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel'); | ||
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download'); | ||
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping'); | ||
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy'); | ||
target.appendChild(link); | ||
@@ -112,8 +112,8 @@ open(link); | ||
return { | ||
"data-href": props.href, | ||
"data-target": props.target, | ||
"data-rel": props.rel, | ||
"data-download": props.download, | ||
"data-ping": props.ping, | ||
"data-referrer-policy": props.referrerPolicy | ||
'data-href': props.href, | ||
'data-target': props.target, | ||
'data-rel': props.rel, | ||
'data-download': props.download, | ||
'data-ping': props.ping, | ||
'data-referrer-policy': props.referrerPolicy | ||
}; | ||
@@ -120,0 +120,0 @@ } |
@@ -27,8 +27,8 @@ | ||
var _window_navigator_userAgentData; | ||
if (typeof window === "undefined" || window.navigator == null) return false; | ||
return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent); | ||
if (typeof window === 'undefined' || window.navigator == null) return false; | ||
return ((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent); | ||
} | ||
function $9e20cff0af27e8cc$var$testPlatform(re) { | ||
var _window_navigator_userAgentData; | ||
return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false; | ||
return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false; | ||
} | ||
@@ -35,0 +35,0 @@ function $9e20cff0af27e8cc$export$9ac100e40613ea10() { |
@@ -13,8 +13,8 @@ /* | ||
var _window_navigator_userAgentData; | ||
if (typeof window === "undefined" || window.navigator == null) return false; | ||
return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent); | ||
if (typeof window === 'undefined' || window.navigator == null) return false; | ||
return ((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent); | ||
} | ||
function $c87311424ea30a05$var$testPlatform(re) { | ||
var _window_navigator_userAgentData; | ||
return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false; | ||
return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false; | ||
} | ||
@@ -21,0 +21,0 @@ function $c87311424ea30a05$export$9ac100e40613ea10() { |
@@ -27,5 +27,5 @@ | ||
function $e8117ebcab55be6a$var$setupGlobalEvents() { | ||
if (typeof window === "undefined") return; | ||
if (typeof window === 'undefined') return; | ||
function isTransitionEvent(event) { | ||
return "propertyName" in event; | ||
return 'propertyName' in event; | ||
} | ||
@@ -42,3 +42,3 @@ let onTransitionStart = (e)=>{ | ||
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly. | ||
e.target.addEventListener("transitioncancel", onTransitionEnd, { | ||
e.target.addEventListener('transitioncancel', onTransitionEnd, { | ||
once: true | ||
@@ -57,3 +57,3 @@ }); | ||
if (properties.size === 0) { | ||
e.target.removeEventListener("transitioncancel", onTransitionEnd); | ||
e.target.removeEventListener('transitioncancel', onTransitionEnd); | ||
$e8117ebcab55be6a$var$transitionsByElement.delete(e.target); | ||
@@ -67,8 +67,8 @@ } | ||
}; | ||
document.body.addEventListener("transitionrun", onTransitionStart); | ||
document.body.addEventListener("transitionend", onTransitionEnd); | ||
document.body.addEventListener('transitionrun', onTransitionStart); | ||
document.body.addEventListener('transitionend', onTransitionEnd); | ||
} | ||
if (typeof document !== "undefined") { | ||
if (document.readyState !== "loading") $e8117ebcab55be6a$var$setupGlobalEvents(); | ||
else document.addEventListener("DOMContentLoaded", $e8117ebcab55be6a$var$setupGlobalEvents); | ||
if (typeof document !== 'undefined') { | ||
if (document.readyState !== 'loading') $e8117ebcab55be6a$var$setupGlobalEvents(); | ||
else document.addEventListener('DOMContentLoaded', $e8117ebcab55be6a$var$setupGlobalEvents); | ||
} | ||
@@ -75,0 +75,0 @@ function $e8117ebcab55be6a$export$24490316f764c430(fn) { |
@@ -21,5 +21,5 @@ /* | ||
function $bbed8b41f857bcc0$var$setupGlobalEvents() { | ||
if (typeof window === "undefined") return; | ||
if (typeof window === 'undefined') return; | ||
function isTransitionEvent(event) { | ||
return "propertyName" in event; | ||
return 'propertyName' in event; | ||
} | ||
@@ -36,3 +36,3 @@ let onTransitionStart = (e)=>{ | ||
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly. | ||
e.target.addEventListener("transitioncancel", onTransitionEnd, { | ||
e.target.addEventListener('transitioncancel', onTransitionEnd, { | ||
once: true | ||
@@ -51,3 +51,3 @@ }); | ||
if (properties.size === 0) { | ||
e.target.removeEventListener("transitioncancel", onTransitionEnd); | ||
e.target.removeEventListener('transitioncancel', onTransitionEnd); | ||
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target); | ||
@@ -61,8 +61,8 @@ } | ||
}; | ||
document.body.addEventListener("transitionrun", onTransitionStart); | ||
document.body.addEventListener("transitionend", onTransitionEnd); | ||
document.body.addEventListener('transitionrun', onTransitionStart); | ||
document.body.addEventListener('transitionend', onTransitionEnd); | ||
} | ||
if (typeof document !== "undefined") { | ||
if (document.readyState !== "loading") $bbed8b41f857bcc0$var$setupGlobalEvents(); | ||
else document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents); | ||
if (typeof document !== 'undefined') { | ||
if (document.readyState !== 'loading') $bbed8b41f857bcc0$var$setupGlobalEvents(); | ||
else document.addEventListener('DOMContentLoaded', $bbed8b41f857bcc0$var$setupGlobalEvents); | ||
} | ||
@@ -69,0 +69,0 @@ function $bbed8b41f857bcc0$export$24490316f764c430(fn) { |
@@ -22,4 +22,4 @@ var $49f0d9486c2408aa$exports = require("./getScrollParents.main.js"); | ||
function $449412113267a1fe$export$53a0910f038337bd(scrollView, element) { | ||
let offsetX = $449412113267a1fe$var$relativeOffset(scrollView, element, "left"); | ||
let offsetY = $449412113267a1fe$var$relativeOffset(scrollView, element, "top"); | ||
let offsetX = $449412113267a1fe$var$relativeOffset(scrollView, element, 'left'); | ||
let offsetY = $449412113267a1fe$var$relativeOffset(scrollView, element, 'top'); | ||
let width = element.offsetWidth; | ||
@@ -47,3 +47,3 @@ let height = element.offsetHeight; | ||
*/ function $449412113267a1fe$var$relativeOffset(ancestor, child, axis) { | ||
const prop = axis === "left" ? "offsetLeft" : "offsetTop"; | ||
const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop'; | ||
let sum = 0; | ||
@@ -67,3 +67,3 @@ while(child.offsetParent){ | ||
let root = document.scrollingElement || document.documentElement; | ||
let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden"; | ||
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden'; | ||
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view | ||
@@ -76,3 +76,3 @@ if (!isScrollPrevented) { | ||
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, { | ||
block: "nearest" | ||
block: 'nearest' | ||
}); | ||
@@ -84,7 +84,7 @@ let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect(); | ||
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, { | ||
block: "center", | ||
inline: "center" | ||
block: 'center', | ||
inline: 'center' | ||
}); | ||
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, { | ||
block: "nearest" | ||
block: 'nearest' | ||
}); | ||
@@ -91,0 +91,0 @@ } |
@@ -15,4 +15,4 @@ import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.module.js"; | ||
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) { | ||
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "left"); | ||
let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "top"); | ||
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'left'); | ||
let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, 'top'); | ||
let width = element.offsetWidth; | ||
@@ -40,3 +40,3 @@ let height = element.offsetHeight; | ||
*/ function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) { | ||
const prop = axis === "left" ? "offsetLeft" : "offsetTop"; | ||
const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop'; | ||
let sum = 0; | ||
@@ -60,3 +60,3 @@ while(child.offsetParent){ | ||
let root = document.scrollingElement || document.documentElement; | ||
let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden"; | ||
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden'; | ||
// If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view | ||
@@ -69,3 +69,3 @@ if (!isScrollPrevented) { | ||
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, { | ||
block: "nearest" | ||
block: 'nearest' | ||
}); | ||
@@ -77,7 +77,7 @@ let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect(); | ||
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, { | ||
block: "center", | ||
inline: "center" | ||
block: 'center', | ||
inline: 'center' | ||
}); | ||
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, { | ||
block: "nearest" | ||
block: 'nearest' | ||
}); | ||
@@ -84,0 +84,0 @@ } |
@@ -32,5 +32,5 @@ var $78605a5d7424e31b$exports = require("./useLayoutEffect.main.js"); | ||
setId(id); | ||
let node = document.createElement("div"); | ||
let node = document.createElement('div'); | ||
node.id = id; | ||
node.style.display = "none"; | ||
node.style.display = 'none'; | ||
node.textContent = description; | ||
@@ -55,3 +55,3 @@ document.body.appendChild(node); | ||
return { | ||
"aria-describedby": description ? id : undefined | ||
'aria-describedby': description ? id : undefined | ||
}; | ||
@@ -58,0 +58,0 @@ } |
@@ -26,5 +26,5 @@ import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.module.js"; | ||
setId(id); | ||
let node = document.createElement("div"); | ||
let node = document.createElement('div'); | ||
node.id = id; | ||
node.style.display = "none"; | ||
node.style.display = 'none'; | ||
node.textContent = description; | ||
@@ -49,3 +49,3 @@ document.body.appendChild(node); | ||
return { | ||
"aria-describedby": description ? id : undefined | ||
'aria-describedby': description ? id : undefined | ||
}; | ||
@@ -52,0 +52,0 @@ } |
@@ -27,5 +27,5 @@ var $16ec41ef3e36c19c$exports = require("./getOffset.main.js"); | ||
function $28ed3fb20343b78b$export$7bbed75feba39706(props) { | ||
console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html"); | ||
console.warn('useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html'); | ||
let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props; | ||
let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY; | ||
let getPosition = (e)=>orientation === 'horizontal' ? e.clientX : e.clientY; | ||
let getNextOffset = (e)=>{ | ||
@@ -65,4 +65,4 @@ let containerOffset = (0, $16ec41ef3e36c19c$exports.getOffset)(containerRef.current, reverse, orientation); | ||
$28ed3fb20343b78b$var$draggingElements.splice($28ed3fb20343b78b$var$draggingElements.indexOf(target), 1); | ||
window.removeEventListener("mouseup", onMouseUp, false); | ||
window.removeEventListener("mousemove", onMouseDragged, false); | ||
window.removeEventListener('mouseup', onMouseUp, false); | ||
window.removeEventListener('mousemove', onMouseDragged, false); | ||
}; | ||
@@ -75,4 +75,4 @@ let onMouseDown = (e)=>{ | ||
$28ed3fb20343b78b$var$draggingElements.push(target); | ||
window.addEventListener("mousemove", onMouseDragged, false); | ||
window.addEventListener("mouseup", onMouseUp, false); | ||
window.addEventListener('mousemove', onMouseDragged, false); | ||
window.addEventListener('mouseup', onMouseUp, false); | ||
}; | ||
@@ -87,5 +87,5 @@ let onMouseEnter = ()=>{ | ||
switch(e.key){ | ||
case "Left": | ||
case "ArrowLeft": | ||
if (orientation === "horizontal") { | ||
case 'Left': | ||
case 'ArrowLeft': | ||
if (orientation === 'horizontal') { | ||
e.preventDefault(); | ||
@@ -96,5 +96,5 @@ if (onDecrement && !reverse) onDecrement(); | ||
break; | ||
case "Up": | ||
case "ArrowUp": | ||
if (orientation === "vertical") { | ||
case 'Up': | ||
case 'ArrowUp': | ||
if (orientation === 'vertical') { | ||
e.preventDefault(); | ||
@@ -105,5 +105,5 @@ if (onDecrement && !reverse) onDecrement(); | ||
break; | ||
case "Right": | ||
case "ArrowRight": | ||
if (orientation === "horizontal") { | ||
case 'Right': | ||
case 'ArrowRight': | ||
if (orientation === 'horizontal') { | ||
e.preventDefault(); | ||
@@ -114,5 +114,5 @@ if (onIncrement && !reverse) onIncrement(); | ||
break; | ||
case "Down": | ||
case "ArrowDown": | ||
if (orientation === "vertical") { | ||
case 'Down': | ||
case 'ArrowDown': | ||
if (orientation === 'vertical') { | ||
e.preventDefault(); | ||
@@ -123,11 +123,11 @@ if (onIncrement && !reverse) onIncrement(); | ||
break; | ||
case "Home": | ||
case 'Home': | ||
e.preventDefault(); | ||
if (onDecrementToMin) onDecrementToMin(); | ||
break; | ||
case "End": | ||
case 'End': | ||
e.preventDefault(); | ||
if (onIncrementToMax) onIncrementToMax(); | ||
break; | ||
case "Enter": | ||
case 'Enter': | ||
e.preventDefault(); | ||
@@ -134,0 +134,0 @@ if (onCollapseToggle) onCollapseToggle(); |
@@ -21,5 +21,5 @@ import {getOffset as $ab71dadb03a6fb2e$export$622cea445a1c5b7d} from "./getOffset.module.js"; | ||
function $9cc09df9fd7676be$export$7bbed75feba39706(props) { | ||
console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html"); | ||
console.warn('useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html'); | ||
let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props; | ||
let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY; | ||
let getPosition = (e)=>orientation === 'horizontal' ? e.clientX : e.clientY; | ||
let getNextOffset = (e)=>{ | ||
@@ -59,4 +59,4 @@ let containerOffset = (0, $ab71dadb03a6fb2e$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation); | ||
$9cc09df9fd7676be$var$draggingElements.splice($9cc09df9fd7676be$var$draggingElements.indexOf(target), 1); | ||
window.removeEventListener("mouseup", onMouseUp, false); | ||
window.removeEventListener("mousemove", onMouseDragged, false); | ||
window.removeEventListener('mouseup', onMouseUp, false); | ||
window.removeEventListener('mousemove', onMouseDragged, false); | ||
}; | ||
@@ -69,4 +69,4 @@ let onMouseDown = (e)=>{ | ||
$9cc09df9fd7676be$var$draggingElements.push(target); | ||
window.addEventListener("mousemove", onMouseDragged, false); | ||
window.addEventListener("mouseup", onMouseUp, false); | ||
window.addEventListener('mousemove', onMouseDragged, false); | ||
window.addEventListener('mouseup', onMouseUp, false); | ||
}; | ||
@@ -81,5 +81,5 @@ let onMouseEnter = ()=>{ | ||
switch(e.key){ | ||
case "Left": | ||
case "ArrowLeft": | ||
if (orientation === "horizontal") { | ||
case 'Left': | ||
case 'ArrowLeft': | ||
if (orientation === 'horizontal') { | ||
e.preventDefault(); | ||
@@ -90,5 +90,5 @@ if (onDecrement && !reverse) onDecrement(); | ||
break; | ||
case "Up": | ||
case "ArrowUp": | ||
if (orientation === "vertical") { | ||
case 'Up': | ||
case 'ArrowUp': | ||
if (orientation === 'vertical') { | ||
e.preventDefault(); | ||
@@ -99,5 +99,5 @@ if (onDecrement && !reverse) onDecrement(); | ||
break; | ||
case "Right": | ||
case "ArrowRight": | ||
if (orientation === "horizontal") { | ||
case 'Right': | ||
case 'ArrowRight': | ||
if (orientation === 'horizontal') { | ||
e.preventDefault(); | ||
@@ -108,5 +108,5 @@ if (onIncrement && !reverse) onIncrement(); | ||
break; | ||
case "Down": | ||
case "ArrowDown": | ||
if (orientation === "vertical") { | ||
case 'Down': | ||
case 'ArrowDown': | ||
if (orientation === 'vertical') { | ||
e.preventDefault(); | ||
@@ -117,11 +117,11 @@ if (onIncrement && !reverse) onIncrement(); | ||
break; | ||
case "Home": | ||
case 'Home': | ||
e.preventDefault(); | ||
if (onDecrementToMin) onDecrementToMin(); | ||
break; | ||
case "End": | ||
case 'End': | ||
e.preventDefault(); | ||
if (onIncrementToMax) onIncrementToMax(); | ||
break; | ||
case "Enter": | ||
case 'Enter': | ||
e.preventDefault(); | ||
@@ -128,0 +128,0 @@ if (onCollapseToggle) onCollapseToggle(); |
@@ -30,5 +30,5 @@ var $1254e5bb94ac8761$exports = require("./useEffectEvent.main.js"); | ||
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form; | ||
form === null || form === void 0 ? void 0 : form.addEventListener("reset", handleReset); | ||
form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset); | ||
return ()=>{ | ||
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset); | ||
}; | ||
@@ -35,0 +35,0 @@ }, [ |
@@ -24,5 +24,5 @@ import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.module.js"; | ||
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form; | ||
form === null || form === void 0 ? void 0 : form.addEventListener("reset", handleReset); | ||
form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset); | ||
return ()=>{ | ||
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset); | ||
}; | ||
@@ -29,0 +29,0 @@ }, [ |
@@ -29,3 +29,3 @@ var $78605a5d7424e31b$exports = require("./useLayoutEffect.main.js"); | ||
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing | ||
let $8c61827343eed941$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement); | ||
let $8c61827343eed941$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement); | ||
let $8c61827343eed941$var$idsUpdaterMap = new Map(); | ||
@@ -32,0 +32,0 @@ function $8c61827343eed941$export$f680877a34711e37(defaultId) { |
@@ -21,3 +21,3 @@ import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.module.js"; | ||
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing | ||
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement); | ||
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement); | ||
let $bdb11010cef70236$var$idsUpdaterMap = new Map(); | ||
@@ -24,0 +24,0 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId) { |
@@ -21,3 +21,3 @@ var $8c61827343eed941$exports = require("./useId.main.js"); | ||
function $6ec78bde395c477d$export$d6875122194c7b44(props, defaultLabel) { | ||
let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props; | ||
let { id: id, 'aria-label': label, 'aria-labelledby': labelledBy } = props; | ||
// If there is both an aria-label and aria-labelledby, | ||
@@ -33,4 +33,4 @@ // combine them by pointing to the element itself. | ||
...ids | ||
].join(" "); | ||
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(" "); | ||
].join(' '); | ||
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(' '); | ||
// If no labels are provided, use the default | ||
@@ -40,4 +40,4 @@ if (!label && !labelledBy && defaultLabel) label = defaultLabel; | ||
id: id, | ||
"aria-label": label, | ||
"aria-labelledby": labelledBy | ||
'aria-label': label, | ||
'aria-labelledby': labelledBy | ||
}; | ||
@@ -44,0 +44,0 @@ } |
@@ -15,3 +15,3 @@ import {useId as $bdb11010cef70236$export$f680877a34711e37} from "./useId.module.js"; | ||
function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) { | ||
let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props; | ||
let { id: id, 'aria-label': label, 'aria-labelledby': labelledBy } = props; | ||
// If there is both an aria-label and aria-labelledby, | ||
@@ -27,4 +27,4 @@ // combine them by pointing to the element itself. | ||
...ids | ||
].join(" "); | ||
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(" "); | ||
].join(' '); | ||
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(' '); | ||
// If no labels are provided, use the default | ||
@@ -34,4 +34,4 @@ if (!label && !labelledBy && defaultLabel) label = defaultLabel; | ||
id: id, | ||
"aria-label": label, | ||
"aria-labelledby": labelledBy | ||
'aria-label': label, | ||
'aria-labelledby': labelledBy | ||
}; | ||
@@ -38,0 +38,0 @@ } |
@@ -24,5 +24,5 @@ var $ezjoC$react = require("react"); | ||
*/ | ||
const $78605a5d7424e31b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? (0, ($parcel$interopDefault($ezjoC$react))).useLayoutEffect : ()=>{}; | ||
const $78605a5d7424e31b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, ($parcel$interopDefault($ezjoC$react))).useLayoutEffect : ()=>{}; | ||
//# sourceMappingURL=useLayoutEffect.main.js.map |
@@ -14,3 +14,3 @@ import $HgANd$react from "react"; | ||
*/ | ||
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? (0, $HgANd$react).useLayoutEffect : ()=>{}; | ||
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, $HgANd$react).useLayoutEffect : ()=>{}; | ||
@@ -17,0 +17,0 @@ |
@@ -28,3 +28,3 @@ var $eMoU1$react = require("react"); | ||
objRef.current = value; | ||
if (typeof forwardedRef === "function") forwardedRef(value); | ||
if (typeof forwardedRef === 'function') forwardedRef(value); | ||
else if (forwardedRef) forwardedRef.current = value; | ||
@@ -31,0 +31,0 @@ } |
@@ -22,3 +22,3 @@ import {useRef as $gbmns$useRef, useMemo as $gbmns$useMemo} from "react"; | ||
objRef.current = value; | ||
if (typeof forwardedRef === "function") forwardedRef(value); | ||
if (typeof forwardedRef === 'function') forwardedRef(value); | ||
else if (forwardedRef) forwardedRef.current = value; | ||
@@ -25,0 +25,0 @@ } |
@@ -11,3 +11,3 @@ var $aM4zL$react = require("react"); | ||
function $37733e1652f47193$var$hasResizeObserver() { | ||
return typeof window.ResizeObserver !== "undefined"; | ||
return typeof window.ResizeObserver !== 'undefined'; | ||
} | ||
@@ -20,5 +20,5 @@ function $37733e1652f47193$export$683480f191c0e3ea(options) { | ||
if (!$37733e1652f47193$var$hasResizeObserver()) { | ||
window.addEventListener("resize", onResize, false); | ||
window.addEventListener('resize', onResize, false); | ||
return ()=>{ | ||
window.removeEventListener("resize", onResize, false); | ||
window.removeEventListener('resize', onResize, false); | ||
}; | ||
@@ -25,0 +25,0 @@ } else { |
@@ -5,3 +5,3 @@ import {useEffect as $Vsl8o$useEffect} from "react"; | ||
function $9daab02d461809db$var$hasResizeObserver() { | ||
return typeof window.ResizeObserver !== "undefined"; | ||
return typeof window.ResizeObserver !== 'undefined'; | ||
} | ||
@@ -14,5 +14,5 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) { | ||
if (!$9daab02d461809db$var$hasResizeObserver()) { | ||
window.addEventListener("resize", onResize, false); | ||
window.addEventListener('resize', onResize, false); | ||
return ()=>{ | ||
window.removeEventListener("resize", onResize, false); | ||
window.removeEventListener('resize', onResize, false); | ||
}; | ||
@@ -19,0 +19,0 @@ } else { |
@@ -23,3 +23,3 @@ var $4gIVO$react = require("react"); | ||
// @ts-ignore | ||
let $8b24bab62f5c65ad$var$visualViewport = typeof document !== "undefined" && window.visualViewport; | ||
let $8b24bab62f5c65ad$var$visualViewport = typeof document !== 'undefined' && window.visualViewport; | ||
function $8b24bab62f5c65ad$export$d699905dd57c73ca() { | ||
@@ -40,7 +40,7 @@ let isSSR = (0, $4gIVO$reactariassr.useIsSSR)(); | ||
}; | ||
if (!$8b24bab62f5c65ad$var$visualViewport) window.addEventListener("resize", onResize); | ||
else $8b24bab62f5c65ad$var$visualViewport.addEventListener("resize", onResize); | ||
if (!$8b24bab62f5c65ad$var$visualViewport) window.addEventListener('resize', onResize); | ||
else $8b24bab62f5c65ad$var$visualViewport.addEventListener('resize', onResize); | ||
return ()=>{ | ||
if (!$8b24bab62f5c65ad$var$visualViewport) window.removeEventListener("resize", onResize); | ||
else $8b24bab62f5c65ad$var$visualViewport.removeEventListener("resize", onResize); | ||
if (!$8b24bab62f5c65ad$var$visualViewport) window.removeEventListener('resize', onResize); | ||
else $8b24bab62f5c65ad$var$visualViewport.removeEventListener('resize', onResize); | ||
}; | ||
@@ -47,0 +47,0 @@ }, []); |
@@ -17,3 +17,3 @@ import {useState as $fuDHA$useState, useEffect as $fuDHA$useEffect} from "react"; | ||
// @ts-ignore | ||
let $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport; | ||
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport; | ||
function $5df64b3807dc15ee$export$d699905dd57c73ca() { | ||
@@ -34,7 +34,7 @@ let isSSR = (0, $fuDHA$useIsSSR)(); | ||
}; | ||
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener("resize", onResize); | ||
else $5df64b3807dc15ee$var$visualViewport.addEventListener("resize", onResize); | ||
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener('resize', onResize); | ||
else $5df64b3807dc15ee$var$visualViewport.addEventListener('resize', onResize); | ||
return ()=>{ | ||
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener("resize", onResize); | ||
else $5df64b3807dc15ee$var$visualViewport.removeEventListener("resize", onResize); | ||
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener('resize', onResize); | ||
else $5df64b3807dc15ee$var$visualViewport.removeEventListener('resize', onResize); | ||
}; | ||
@@ -41,0 +41,0 @@ }, []); |
{ | ||
"name": "@react-aria/utils", | ||
"version": "3.24.0", | ||
"version": "3.24.1", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/ssr": "^3.9.3", | ||
"@react-stately/utils": "^3.10.0", | ||
"@react-types/shared": "^3.23.0", | ||
"@react-aria/ssr": "^3.9.4", | ||
"@react-stately/utils": "^3.10.1", | ||
"@react-types/shared": "^3.23.1", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -38,3 +38,3 @@ "clsx": "^2.0.0" | ||
}, | ||
"gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd" | ||
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
532953
0
Updated@react-aria/ssr@^3.9.4
Updated@react-stately/utils@^3.10.1
Updated@react-types/shared@^3.23.1