@react-spectrum/overlays 3.4.8 → 3.6.1

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.css CHANGED
@@ -1 +1 @@
1
- .spectrum-Popover_38efea.react-spectrum-Popover_38efea{visibility:visible}.spectrum-Popover_38efea .spectrum-Dialog-content_38efea{max-height:initial}.spectrum-Modal-wrapper_38efea.react-spectrum-Modal-wrapper_38efea,.spectrum-Modal_38efea.react-spectrum-Modal_38efea,.spectrum-Tray_38efea.react-spectrum-Tray_38efea{visibility:visible}.spectrum-Popover_6115b8{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Popover_6115b8.is-open_6115b8{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Popover--bottom_6115b8.is-open_6115b8{transform:translateY(var(--spectrum-overlay-positive-transform-distance))}.spectrum-Popover--top_6115b8.is-open_6115b8{transform:translateY(var(--spectrum-overlay-negative-transform-distance))}.spectrum-Popover--right_6115b8.is-open_6115b8{transform:translateX(var(--spectrum-overlay-positive-transform-distance))}.spectrum-Popover--left_6115b8.is-open_6115b8{transform:translateX(var(--spectrum-overlay-negative-transform-distance))}.spectrum-Popover_6115b8{box-sizing:border-box;min-width:var(--spectrum-global-dimension-size-400);min-height:var(--spectrum-global-dimension-size-400);border-style:solid;border-width:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin));border-radius:var(--spectrum-popover-border-radius,var(--spectrum-alias-border-radius-regular));outline:0;flex-direction:column;display:inline-flex;position:absolute}.spectrum-Popover-tip_6115b8{--spectrum-popover-tip-size:var(--spectrum-popover-tip-width,var(--spectrum-global-dimension-size-250));--spectrum-popover-tip-borderWidth:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin));position:absolute;-webkit-transform:translate(0)}.spectrum-Popover-tip_6115b8 .spectrum-Popover-tip-triangle_6115b8{stroke-linecap:square;stroke-linejoin:miter;stroke-width:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin))}.spectrum-Popover--dialog_6115b8{min-width:270px;padding:30px 29px}.spectrum-Popover--left_6115b8.spectrum-Popover--withTip_6115b8{margin-right:13px}.spectrum-Popover--left_6115b8 .spectrum-Popover-tip_6115b8{left:100%}.spectrum-Popover--right_6115b8.spectrum-Popover--withTip_6115b8{margin-left:13px}.spectrum-Popover--right_6115b8 .spectrum-Popover-tip_6115b8{right:100%;transform:scaleX(-1)}.spectrum-Popover--left_6115b8 .spectrum-Popover-tip_6115b8,.spectrum-Popover--right_6115b8 .spectrum-Popover-tip_6115b8{margin-top:calc(var(--spectrum-global-dimension-size-150)*-1);top:50%}.spectrum-Popover--bottom_6115b8.spectrum-Popover--withTip_6115b8{margin-top:13px}.spectrum-Popover--bottom_6115b8 .spectrum-Popover-tip_6115b8{bottom:100%;transform:scaleY(-1)}.spectrum-Popover--top_6115b8.spectrum-Popover--withTip_6115b8{margin-bottom:13px}.spectrum-Popover--top_6115b8 .spectrum-Popover-tip_6115b8{top:100%}.spectrum-Popover--bottom_6115b8 .spectrum-Popover-tip_6115b8,.spectrum-Popover--top_6115b8 .spectrum-Popover-tip_6115b8{margin-left:calc(var(--spectrum-global-dimension-size-150)*-1);left:50%}.spectrum-Popover_6115b8{background-color:var(--spectrum-popover-background-color,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-popover-border-color,var(--spectrum-alias-border-color-dark));filter:drop-shadow(0 1px 4px var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));-webkit-filter:drop-shadow(0 1px 4px var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));will-change:filter;-webkit-clip-path:inset(-30px -30px);clip-path:inset(-30px)}.spectrum-Popover_6115b8 .spectrum-Popover-tip_6115b8 .spectrum-Popover-tip-triangle_6115b8{fill:var(--spectrum-popover-background-color,var(--spectrum-global-color-gray-50));stroke:var(--spectrum-popover-border-color,var(--spectrum-alias-border-color-dark))}.spectrum-Modal_f81956{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Modal_f81956.is-open_f81956{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Modal-wrapper_f81956{box-sizing:border-box;width:100vw;height:var(--spectrum-visual-viewport-height);visibility:hidden;pointer-events:none;z-index:2;transition:visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);justify-content:center;align-items:center;display:flex;position:fixed;top:0;left:0}.spectrum-Modal-wrapper_f81956.is-open_f81956{visibility:visible}.spectrum-Modal_f81956{transform:translateY(var(--spectrum-dialog-entry-animation-distance,var(--spectrum-global-dimension-size-250)));z-index:2;max-height:calc(var(--spectrum-visual-viewport-height)*0.9);max-width:90vw;min-width:var(--spectrum-dialog-min-width,var(--spectrum-global-dimension-static-size-3600));border-radius:var(--spectrum-dialog-border-radius,var(--spectrum-global-dimension-size-50));pointer-events:auto;transition:opacity var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms,visibility 0ms linear calc(0ms + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))),transform 0ms linear calc(0ms + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100)));outline:0}.spectrum-Modal_f81956.is-open_f81956{transition:transform var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200)),opacity var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200));transform:translateY(0)}@media only screen and (max-device-width:400px),only screen and (max-device-height:350px){.spectrum-Modal--responsive_f81956{width:100%;height:100%;max-width:100%;max-height:100%;border-radius:0}.spectrum-Modal-wrapper_f81956 .spectrum-Modal--responsive_f81956{margin-top:0}}.spectrum-Modal--fullscreen_f81956{max-width:none;max-height:none;width:calc(100% - 80px);height:calc(100% - 80px);position:fixed;top:40px;bottom:40px;left:40px;right:40px}.spectrum-Modal--fullscreenTakeover_f81956{max-width:none;max-height:none;box-sizing:border-box;border-radius:0;border:0;position:fixed;top:0;bottom:0;left:0;right:0}.spectrum-Modal--fullscreenTakeover_f81956,.spectrum-Modal--fullscreenTakeover_f81956.is-open_f81956{transform:none}.spectrum-Modal_f81956{background:var(--spectrum-dialog-background-color,var(--spectrum-alias-background-color-default))}.spectrum-Underlay_eb7615{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Underlay_eb7615.is-open_eb7615{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Underlay_eb7615{z-index:1;transition:opacity var(--spectrum-dialog-background-exit-animation-duration,var(--spectrum-global-animation-duration-300))cubic-bezier(0.5,0,1,1)var(--spectrum-dialog-background-exit-animation-delay,var(--spectrum-global-animation-duration-200)),visibility 0ms linear calc(var(--spectrum-dialog-background-exit-animation-delay,var(--spectrum-global-animation-duration-200)) + var(--spectrum-dialog-background-exit-animation-duration,var(--spectrum-global-animation-duration-300)));position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden}.spectrum-Underlay_eb7615.is-open_eb7615{transition:opacity var(--spectrum-dialog-background-entry-animation-duration,var(--spectrum-global-animation-duration-600))cubic-bezier(0,0,0.4,1)0ms}.spectrum-Underlay_eb7615{background:var(--spectrum-dialog-underlay-background-color,var(--spectrum-alias-background-color-modal-overlay))}.spectrum-Tray_23bf66{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Tray_23bf66.is-open_23bf66{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}[dir=ltr] .spectrum-Tray-wrapper_23bf66{left:0}[dir=rtl] .spectrum-Tray-wrapper_23bf66{right:0}.spectrum-Tray-wrapper_23bf66{width:100%;height:var(--spectrum-visual-viewport-height);pointer-events:none;z-index:2;justify-content:center;display:flex;position:fixed;top:0}.spectrum-Tray_23bf66{--spectrum-tray-margin-top:64px;width:var(--spectrum-tray-width,100%);max-width:var(--spectrum-tray-max-width,375px);min-height:var(--spectrum-tray-min-height,var(--spectrum-global-dimension-static-size-800));max-height:calc(var(--spectrum-visual-viewport-height) - var(--spectrum-tray-margin-top));padding-bottom:env(safe-area-inset-bottom);border-radius:var(--spectrum-tray-full-width-border-radius,var(--spectrum-alias-border-radius-regular))var(--spectrum-tray-full-width-border-radius,var(--spectrum-alias-border-radius-regular))var(--spectrum-tray-border-radius,0px)var(--spectrum-tray-border-radius,0px);transition:opacity var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms,transform var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms;outline:0;flex-direction:column;display:flex;position:absolute;bottom:0;transform:translateY(100%)}.spectrum-Tray_23bf66.is-open_23bf66{transition:transform var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200)),opacity var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200));transform:translateY(0)}.spectrum-Tray--fixedHeight_23bf66{height:calc(var(--spectrum-visual-viewport-height) - var(--spectrum-tray-margin-top));top:var(--spectrum-tray-margin-top)}@media (max-width:375px){.spectrum-Tray_23bf66{border-radius:var(--spectrum-tray-border-radius,0px)}}.spectrum-Tray_23bf66{background-color:var(--spectrum-tray-background-color)}
1
+ .spectrum-Popover_38efea.react-spectrum-Popover_38efea{visibility:visible}.spectrum-Popover_38efea .spectrum-Dialog-content_38efea{max-height:initial}.spectrum-Modal-wrapper_38efea.react-spectrum-Modal-wrapper_38efea,.spectrum-Modal_38efea.react-spectrum-Modal_38efea,.spectrum-Tray_38efea.react-spectrum-Tray_38efea{visibility:visible}.spectrum-Popover_6115b8{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Popover_6115b8.is-open_6115b8{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Popover--bottom_6115b8.is-open_6115b8{transform:translateY(var(--spectrum-overlay-positive-transform-distance))}.spectrum-Popover--top_6115b8.is-open_6115b8{transform:translateY(var(--spectrum-overlay-negative-transform-distance))}.spectrum-Popover--right_6115b8.is-open_6115b8{transform:translateX(var(--spectrum-overlay-positive-transform-distance))}.spectrum-Popover--left_6115b8.is-open_6115b8{transform:translateX(var(--spectrum-overlay-negative-transform-distance))}.spectrum-Popover_6115b8{box-sizing:border-box;min-width:var(--spectrum-global-dimension-size-400);min-height:var(--spectrum-global-dimension-size-400);border-style:solid;border-width:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin));border-radius:var(--spectrum-popover-border-radius,var(--spectrum-alias-border-radius-regular));outline:0;flex-direction:column;display:inline-flex;position:absolute}.spectrum-Popover-tip_6115b8{--spectrum-popover-tip-size:var(--spectrum-popover-tip-width,var(--spectrum-global-dimension-size-250));--spectrum-popover-tip-borderWidth:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin));position:absolute;-webkit-transform:translate(0)}.spectrum-Popover-tip_6115b8 .spectrum-Popover-tip-triangle_6115b8{stroke-linecap:square;stroke-linejoin:miter;stroke-width:var(--spectrum-popover-border-size,var(--spectrum-alias-border-size-thin))}.spectrum-Popover--dialog_6115b8{min-width:270px;padding:30px 29px}.spectrum-Popover--left_6115b8.spectrum-Popover--withTip_6115b8{margin-right:13px}.spectrum-Popover--left_6115b8 .spectrum-Popover-tip_6115b8{left:100%}.spectrum-Popover--right_6115b8.spectrum-Popover--withTip_6115b8{margin-left:13px}.spectrum-Popover--right_6115b8 .spectrum-Popover-tip_6115b8{right:100%;transform:scaleX(-1)}.spectrum-Popover--left_6115b8 .spectrum-Popover-tip_6115b8,.spectrum-Popover--right_6115b8 .spectrum-Popover-tip_6115b8{margin-top:calc(var(--spectrum-global-dimension-size-150)*-1);top:50%}.spectrum-Popover--bottom_6115b8.spectrum-Popover--withTip_6115b8{margin-top:13px}.spectrum-Popover--bottom_6115b8 .spectrum-Popover-tip_6115b8{bottom:100%;transform:scaleY(-1)}.spectrum-Popover--top_6115b8.spectrum-Popover--withTip_6115b8{margin-bottom:13px}.spectrum-Popover--top_6115b8 .spectrum-Popover-tip_6115b8{top:100%}.spectrum-Popover--bottom_6115b8 .spectrum-Popover-tip_6115b8,.spectrum-Popover--top_6115b8 .spectrum-Popover-tip_6115b8{margin-left:calc(var(--spectrum-global-dimension-size-150)*-1);left:50%}.spectrum-Popover_6115b8{background-color:var(--spectrum-popover-background-color,var(--spectrum-global-color-gray-50));border-color:var(--spectrum-popover-border-color,var(--spectrum-alias-border-color-dark));filter:drop-shadow(0 1px 4px var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));-webkit-filter:drop-shadow(0 1px 4px var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));will-change:filter;-webkit-clip-path:inset(-30px -30px);clip-path:inset(-30px)}.spectrum-Popover_6115b8 .spectrum-Popover-tip_6115b8 .spectrum-Popover-tip-triangle_6115b8{fill:var(--spectrum-popover-background-color,var(--spectrum-global-color-gray-50));stroke:var(--spectrum-popover-border-color,var(--spectrum-alias-border-color-dark))}.spectrum-Modal_f81956{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Modal_f81956.is-open_f81956{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Modal-wrapper_f81956{box-sizing:border-box;width:100vw;height:var(--spectrum-visual-viewport-height);visibility:hidden;pointer-events:none;z-index:2;transition:visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);justify-content:center;align-items:center;display:flex;position:fixed;top:0;left:0}.spectrum-Modal-wrapper_f81956.is-open_f81956{visibility:visible}.spectrum-Modal_f81956{transform:translateY(var(--spectrum-dialog-entry-animation-distance,var(--spectrum-global-dimension-size-250)));z-index:2;max-height:calc(var(--spectrum-visual-viewport-height)*0.9);max-width:90vw;min-width:var(--spectrum-dialog-min-width,var(--spectrum-global-dimension-static-size-3600));border-radius:var(--spectrum-dialog-border-radius,var(--spectrum-global-dimension-size-50));pointer-events:auto;transition:opacity var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms,visibility 0ms linear calc(0ms + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))),transform 0ms linear calc(0ms + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100)));outline:0}.spectrum-Modal_f81956.is-open_f81956{transition:transform var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200)),opacity var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200));transform:translateY(0)}@media only screen and (max-device-width:400px),only screen and (max-device-height:350px){.spectrum-Modal--responsive_f81956{width:100%;height:100%;max-width:100%;max-height:100%;border-radius:0}.spectrum-Modal-wrapper_f81956 .spectrum-Modal--responsive_f81956{margin-top:0}}.spectrum-Modal--fullscreen_f81956{max-width:none;max-height:none;width:calc(100% - 80px);height:calc(100% - 80px);position:fixed;top:40px;bottom:40px;left:40px;right:40px}.spectrum-Modal--fullscreenTakeover_f81956{max-width:none;max-height:none;box-sizing:border-box;border-radius:0;border:0;position:fixed;top:0;bottom:0;left:0;right:0}.spectrum-Modal--fullscreenTakeover_f81956,.spectrum-Modal--fullscreenTakeover_f81956.is-open_f81956{transform:none}.spectrum-Modal_f81956{background:var(--spectrum-dialog-background-color,var(--spectrum-alias-background-color-default))}.spectrum-Underlay_eb7615{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Underlay_eb7615.is-open_eb7615{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}.spectrum-Underlay_eb7615{z-index:1;transition:opacity var(--spectrum-dialog-background-exit-animation-duration,var(--spectrum-global-animation-duration-300))cubic-bezier(0.5,0,1,1)var(--spectrum-dialog-background-exit-animation-delay,var(--spectrum-global-animation-duration-200)),visibility 0ms linear calc(var(--spectrum-dialog-background-exit-animation-delay,var(--spectrum-global-animation-duration-200)) + var(--spectrum-dialog-background-exit-animation-duration,var(--spectrum-global-animation-duration-300)));position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden}.spectrum-Underlay_eb7615.is-open_eb7615{transition:opacity var(--spectrum-dialog-background-entry-animation-duration,var(--spectrum-global-animation-duration-600))cubic-bezier(0,0,0.4,1)0ms}.spectrum-Underlay_eb7615{background:var(--spectrum-dialog-underlay-background-color,var(--spectrum-alias-background-color-modal-overlay))}.spectrum-Tray_23bf66{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,130ms)ease-in-out,opacity var(--spectrum-global-animation-duration-100,130ms)ease-in-out,visibility 0ms linear var(--spectrum-global-animation-duration-100,130ms);pointer-events:none}.spectrum-Tray_23bf66.is-open_23bf66{visibility:visible;opacity:.9999;pointer-events:auto;transition-delay:0s}[dir=ltr] .spectrum-Tray-wrapper_23bf66{left:0}[dir=rtl] .spectrum-Tray-wrapper_23bf66{right:0}.spectrum-Tray-wrapper_23bf66{width:100%;height:100vh;pointer-events:none;z-index:2;justify-content:center;display:flex;position:fixed;top:0}.spectrum-Tray_23bf66{--spectrum-tray-margin-top:64px;--spectrum-tray-max-width:450px;width:var(--spectrum-tray-width,100%);max-width:var(--spectrum-tray-max-width,375px);min-height:var(--spectrum-tray-min-height,var(--spectrum-global-dimension-static-size-800));max-height:calc(var(--spectrum-visual-viewport-height) - var(--spectrum-tray-margin-top));padding-bottom:max(calc(100vh - var(--spectrum-visual-viewport-height)),env(safe-area-inset-bottom));border-radius:var(--spectrum-tray-full-width-border-radius,var(--spectrum-alias-border-radius-regular))var(--spectrum-tray-full-width-border-radius,var(--spectrum-alias-border-radius-regular))var(--spectrum-tray-border-radius,0px)var(--spectrum-tray-border-radius,0px);transition:opacity var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms,transform var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(0.5,0,1,1)0ms;outline:0;flex-direction:column;display:flex;position:absolute;bottom:0;transform:translateY(100%)}.spectrum-Tray_23bf66.is-open_23bf66{transition:transform var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200)),opacity var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(0,0,0.4,1)var(--spectrum-dialog-entry-animation-delay,var(--spectrum-global-animation-duration-200));transform:translateY(0)}.spectrum-Tray--fixedHeight_23bf66{height:calc(var(--spectrum-visual-viewport-height) - var(--spectrum-tray-margin-top));top:var(--spectrum-tray-margin-top)}@media (max-width:450px){.spectrum-Tray_23bf66{border-radius:var(--spectrum-tray-border-radius,0px)}}.spectrum-Tray_23bf66{background-color:var(--spectrum-tray-background-color)}
package/dist/main.js CHANGED
@@ -42,6 +42,7 @@ const $13f51cdc44d228b9$var$OPEN_STATES = {
42
42
  entered: true
43
43
  };
44
44
  function $13f51cdc44d228b9$export$b847a40ee92eff38(props) {
45
+ var child1;
45
46
  return(/*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement(($parcel$interopDefault($eLPAa$reacttransitiongroupTransition)), {
46
47
  timeout: {
47
48
  enter: 0,
@@ -447,24 +448,8 @@ let $6b386deda21be662$var$TrayWrapper = /*#__PURE__*/ $eLPAa$react.forwardRef(fu
447
448
  // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard
448
449
  // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.
449
450
  let viewport = $eLPAa$reactariautils.useViewportSize();
450
- let [height, setHeight] = $eLPAa$react.useState(viewport.height);
451
- let timeoutRef = $eLPAa$react.useRef();
452
- $eLPAa$react.useEffect(()=>{
453
- clearTimeout(timeoutRef.current);
454
- // When the height is decreasing, and the keyboard is visible
455
- // (visual viewport smaller than layout viewport), delay setting
456
- // the new max height until after the animation is complete
457
- // so that there isn't an empty space under the tray briefly.
458
- if (viewport.height < height && viewport.height < window.innerHeight) timeoutRef.current = setTimeout(()=>{
459
- setHeight(viewport.height);
460
- }, 500);
461
- else setHeight(viewport.height);
462
- }, [
463
- height,
464
- viewport.height
465
- ]);
466
451
  let wrapperStyle = {
467
- '--spectrum-visual-viewport-height': height + 'px'
452
+ '--spectrum-visual-viewport-height': viewport.height + 'px'
468
453
  };
469
454
  let wrapperClassName = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports)), 'spectrum-Tray-wrapper');
470
455
  let className = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports)), 'spectrum-Tray', {
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEeA,KAAK,CAAC,iCAAW,GAAG,CAAC;IACnB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,IAAI;AACf,CAAC;SAee,yCAAc,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,oEACH,+DAAU;QAAC,OAAO,EAAE,CAAC;YAAA,KAAK,EAAE,CAAC;YAAE,IAAI,EAAE,GAAG;QAAA,CAAC;WAAM,KAAK;QACjD,KAAK,GAAK,sCAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAE,KAAK,GAAI,KAAK,kBAAI,sCAAK,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;gBAAA,MAAM,IAAI,iCAAW,CAAC,KAAK;YAAC,CAAC;;;AAG/H,CAAC;;;;;;SDpBQ,6BAAO,CAAC,KAAmB,EAAE,GAA2B,EAAE,CAAC;IAClE,GAAG,CAAC,CAAC,WAAA,QAAQ,WAAE,MAAM,cAAE,SAAS,YAAE,OAAO,eAAE,UAAU,cAAE,SAAS,WAAE,MAAM,cAAE,SAAS,aAAE,QAAQ,EAAA,CAAC,GAAG,KAAK;IACtG,GAAG,EAAE,MAAM,EAAE,SAAS,IAAI,qBAAQ,EAAE,MAAM;IAE1C,GAAG,CAAC,aAAa,GAAG,wBAAW,KAAO,CAAC;QACrC,SAAS,CAAC,KAAK;QACf,EAAE,EAAE,SAAS,EACX,SAAS;IAEb,CAAC,EAAE,CAAC;QAAA,SAAS;IAAA,CAAC;IAEd,GAAG,CAAC,YA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S;QACpB,GAAG,EAAE,GAAG;QACR,CAAW,cAAC,CAAM;OACjB,QAAQ;AAIjB,CAAC;AAED,GAAG,CAAC,yCAAK,iBAAG,uBAAU,CAAC,0BAAI;;","sources":["packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/overlays.css","packages/@adobe/spectrum-css-temp/components/popover/vars.css","packages/@react-spectrum/overlays/src/Modal.tsx","packages/@adobe/spectrum-css-temp/components/modal/vars.css","packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@adobe/spectrum-css-temp/components/underlay/vars.css","packages/@react-spectrum/overlays/src/Tray.tsx","packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n","/*\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 {DOMRef} from '@react-types/shared';\nimport {OpenTransition} from './OpenTransition';\nimport {OverlayProps} from '@react-types/overlays';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {useCallback, useState} from 'react';\nimport ReactDOM from 'react-dom';\n\nfunction Overlay(props: OverlayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isOpen, container, onEnter, onEntering, onEntered, onExit, onExiting, onExited} = props;\n let [exited, setExited] = useState(!isOpen);\n\n let handleEntered = useCallback(() => {\n setExited(false);\n if (onEntered) {\n onEntered();\n }\n }, [onEntered]);\n\n let handleExited = useCallback(() => {\n setExited(true);\n if (onExited) {\n onExited();\n }\n }, [onExited]);\n\n // Don't un-render the overlay while it's transitioning out.\n let mountOverlay = isOpen || !exited;\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n let contents = (\n <Provider ref={ref} UNSAFE_style={{background: 'transparent', isolation: 'isolate'}}>\n <OpenTransition\n in={isOpen}\n appear\n onExit={onExit}\n onExiting={onExiting}\n onExited={handleExited}\n onEnter={onEnter}\n onEntering={onEntering}\n onEntered={handleEntered}>\n {children}\n </OpenTransition>\n </Provider>\n );\n\n return ReactDOM.createPortal(contents, container || document.body);\n}\n\nlet _Overlay = React.forwardRef(Overlay);\nexport {_Overlay as Overlay};\n","/*\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 from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst OPEN_STATES = {\n entering: false,\n entered: true\n};\n\n/**\n * Timeout issues adding css animations to enter may be related to\n * https://github.com/reactjs/react-transition-group/issues/189 or\n * https://github.com/reactjs/react-transition-group/issues/22\n * my VM isn't good enough to debug accurately and get a better answer.\n *\n * As a result, use enter 0 so that is-open is applied once entered\n * it doesn't matter if we know when the css-animation is done on entering\n * for exiting though, give time for the css-animation to play\n * before removing from the DOM\n * **note** hitting esc bypasses exit animation for anyone testing.\n */\n\nexport function OpenTransition(props) {\n return (\n <Transition timeout={{enter: 0, exit: 350}} {...props}>\n {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport {PlacementAxis, PopoverProps} from '@react-types/overlays';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/popover/vars.css';\nimport {useModal, useOverlay} from '@react-aria/overlays';\n\ninterface PopoverWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n placement?: PlacementAxis,\n arrowProps?: HTMLAttributes<HTMLElement>,\n hideArrow?: boolean,\n isOpen?: boolean,\n onClose?: () => void,\n shouldCloseOnBlur?: boolean,\n isKeyboardDismissDisabled?: boolean,\n isNonModal?: boolean,\n isDismissable?: boolean\n}\n\n/**\n * Arrow placement can be done pointing right or down because those paths start at 0, x or y. Because the\n * other two don't, they start at a fractional pixel value, it introduces rounding differences between browsers and\n * between display types (retina with subpixels vs not retina). By flipping them with CSS we can ensure that\n * the path always starts at 0 so that it perfectly overlaps the popover's border.\n * See bottom of file for more explanation.\n */\nlet arrowPlacement = {\n left: 'right',\n right: 'right',\n top: 'bottom',\n bottom: 'bottom'\n};\n\nfunction Popover(props: PopoverProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n placement,\n arrowProps,\n onClose,\n shouldCloseOnBlur,\n hideArrow,\n isKeyboardDismissDisabled,\n isNonModal,\n isDismissable = true,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n return (\n <Overlay {...otherProps}>\n <PopoverWrapper\n {...styleProps}\n ref={domRef}\n placement={placement}\n arrowProps={arrowProps}\n onClose={onClose}\n shouldCloseOnBlur={shouldCloseOnBlur}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow}\n isNonModal={isNonModal}\n isDismissable={isDismissable}>\n {children}\n </PopoverWrapper>\n </Overlay>\n );\n}\n\nconst PopoverWrapper = forwardRef((props: PopoverWrapperProps, ref: RefObject<HTMLDivElement>) => {\n let {\n children,\n placement = 'bottom',\n arrowProps,\n isOpen,\n hideArrow,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldCloseOnBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isKeyboardDismissDisabled,\n isNonModal,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isDismissable,\n ...otherProps\n } = props;\n let {overlayProps} = useOverlay({...props, isDismissable: isDismissable && isOpen}, ref);\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n return (\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Popover',\n `spectrum-Popover--${placement}`,\n {\n 'spectrum-Popover--withTip': !hideArrow,\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Popover',\n 'react-spectrum-Popover'\n ),\n otherProps.className\n )\n }\n role=\"presentation\"\n data-testid=\"popover\">\n {children}\n {hideArrow ? null : (\n <Arrow arrowProps={arrowProps} direction={arrowPlacement[placement]} />\n )}\n </div>\n );\n});\n\nlet ROOT_2 = Math.sqrt(2);\n\nfunction Arrow(props) {\n let [size, setSize] = useState(20);\n let [borderWidth, setBorderWidth] = useState(1);\n let ref = useRef();\n // get the css value for the tip size and divide it by 2 for this arrow implementation\n useLayoutEffect(() => {\n if (ref.current) {\n let spectrumTipWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-size');\n if (spectrumTipWidth !== '') {\n setSize(parseInt(spectrumTipWidth, 10) / 2);\n }\n\n let spectrumBorderWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-borderWidth');\n if (spectrumBorderWidth !== '') {\n setBorderWidth(parseInt(spectrumBorderWidth, 10));\n }\n }\n }, [ref]);\n\n let landscape = props.direction === 'top' || props.direction === 'bottom';\n let mirror = props.direction === 'left' || props.direction === 'top';\n\n let borderDiagonal = borderWidth * ROOT_2;\n let halfBorderDiagonal = borderDiagonal / 2;\n\n let secondary = 2 * size + 2 * borderDiagonal;\n let primary = size + borderDiagonal;\n\n let primaryStart = mirror ? primary : 0;\n let primaryEnd = mirror ? halfBorderDiagonal : primary - halfBorderDiagonal;\n\n let secondaryStart = halfBorderDiagonal;\n let secondaryMiddle = secondary / 2;\n let secondaryEnd = secondary - halfBorderDiagonal;\n\n let pathData = landscape ? [\n 'M', secondaryStart, primaryStart,\n 'L', secondaryMiddle, primaryEnd,\n 'L', secondaryEnd, primaryStart\n ] : [\n 'M', primaryStart, secondaryStart,\n 'L', primaryEnd, secondaryMiddle,\n 'L', primaryStart, secondaryEnd\n ];\n let arrowProps = props.arrowProps;\n\n /* use ceil because the svg needs to always accomodate the path inside it */\n return (\n <svg\n xmlns=\"http://www.w3.org/svg/2000\"\n width={Math.ceil(landscape ? secondary : primary)}\n height={Math.ceil(landscape ? primary : secondary)}\n style={props.style}\n className={classNames(styles, 'spectrum-Popover-tip')}\n ref={ref}\n {...arrowProps}>\n <path className={classNames(styles, 'spectrum-Popover-tip-triangle')} d={pathData.join(' ')} />\n </svg>\n );\n}\n\nlet _Popover = forwardRef(Popover);\nexport {_Popover as Popover};\n\n/**\n * More explanation on popover tips.\n * - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid.\n * This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom.\n * - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border.\n * This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border.\n * - I tried getting the client bounding box and setting the svg to that partial pixel value\n * This didn't work because again the issue was inside the svg\n * - I didn't try drawing the svg backwards\n * This could still be tried\n * - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded\n * This seems to have done the trick.\n */\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n.spectrum-Popover {\n /* This makes the contents of popovers focusable immediately, without waiting\n a frame for animations to start. */\n &.react-spectrum-Popover {\n visibility: visible;\n }\n\n .spectrum-Dialog-content {\n max-height: initial;\n }\n}\n\n.spectrum-Modal-wrapper.react-spectrum-Modal-wrapper,\n.spectrum-Modal.react-spectrum-Modal {\n visibility: visible;\n}\n\n.spectrum-Tray.react-spectrum-Tray {\n visibility: visible;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {ModalProps} from '@react-types/overlays';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface ModalWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, type, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay(props, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <ModalWrapper\n {...styleProps}\n onClose={onClose}\n type={type}\n ref={domRef}\n overlayProps={overlayProps}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n}\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: RefObject<HTMLDivElement>) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children, isOpen, type, overlayProps, ...otherProps} = props;\n let typeVariant = typeMap[type];\n\n usePreventScroll();\n let {modalProps} = useModal();\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n otherProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n return (\n <div className={wrapperClassName} style={style}>\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Modal = forwardRef(Modal);\nexport {_Modal as Modal};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean\n}\n\nexport function Underlay({isOpen}: UnderlayProps) {\n return (\n <div className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen})} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useEffect, useRef, useState} from 'react';\nimport {TrayProps} from '@react-types/overlays';\nimport trayStyles from '@adobe/spectrum-css-temp/components/tray/vars.css';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface TrayWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n isFixedHeight?: boolean,\n isNonModal?: boolean,\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Tray(props: TrayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, isFixedHeight, isNonModal, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay({...props, isDismissable: true}, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <TrayWrapper\n {...styleProps}\n onClose={onClose}\n ref={domRef}\n overlayProps={overlayProps}\n isFixedHeight={isFixedHeight}\n isNonModal={isNonModal}>\n {children}\n </TrayWrapper>\n </Overlay>\n );\n}\n\nlet TrayWrapper = forwardRef(function (props: TrayWrapperProps, ref: RefObject<HTMLDivElement>) {\n let {\n children,\n isOpen,\n isFixedHeight,\n isNonModal,\n overlayProps,\n ...otherProps\n } = props;\n usePreventScroll();\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n // We need to measure the window's height in JS rather than using percentages in CSS\n // so that contents (e.g. menu) can inherit the max-height properly. Using percentages\n // does not work properly because there is nothing to base the percentage on.\n // We cannot use vh units because mobile browsers adjust the window height dynamically\n // when the address bar/bottom toolbars show and hide on scroll and vh units are fixed.\n // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard\n // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.\n let viewport = useViewportSize();\n let [height, setHeight] = useState(viewport.height);\n let timeoutRef = useRef<any>();\n\n useEffect(() => {\n clearTimeout(timeoutRef.current);\n\n // When the height is decreasing, and the keyboard is visible\n // (visual viewport smaller than layout viewport), delay setting\n // the new max height until after the animation is complete\n // so that there isn't an empty space under the tray briefly.\n if (viewport.height < height && viewport.height < window.innerHeight) {\n timeoutRef.current = setTimeout(() => {\n setHeight(viewport.height);\n }, 500);\n } else {\n setHeight(viewport.height);\n }\n }, [height, viewport.height]);\n\n let wrapperStyle: any = {\n '--spectrum-visual-viewport-height': height + 'px'\n };\n\n let wrapperClassName = classNames(\n trayStyles,\n 'spectrum-Tray-wrapper'\n );\n\n let className = classNames(\n trayStyles,\n 'spectrum-Tray',\n {\n 'is-open': isOpen,\n 'spectrum-Tray--fixedHeight': isFixedHeight\n },\n classNames(\n overrideStyles,\n 'spectrum-Tray',\n 'react-spectrum-Tray'\n ),\n otherProps.className\n );\n\n let domProps = mergeProps(otherProps, overlayProps);\n\n return (\n <div className={wrapperClassName} style={wrapperStyle}>\n <div\n {...domProps}\n {...modalProps}\n className={className}\n ref={ref}\n data-testid=\"tray\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Tray = forwardRef(Tray);\nexport {_Tray as Tray};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEeA,KAAK,CAAC,iCAAW,GAAG,CAAC;IACnB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,IAAI;AACf,CAAC;SAee,yCAAc,CAAC,KAAK,EAAE,CAAC;QAGO,MAAK;IAGjD,MAAM,oEACH,+DAAU;QAAC,OAAO,EAAE,CAAC;YAAA,KAAK,EAAE,CAAC;YAAE,IAAI,EAAE,GAAG;QAAA,CAAC;WAAM,KAAK;QACjD,KAAK,GAAK,sCAAK,CAAC,QAAQ,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;WACR,UAAU;QACd,SAAS,EAAE,SAAS;QACpB,GAAG,EAAE,GAAG;QACR,CAAW,cAAC,CAAM;OACjB,QAAQ;AAIjB,CAAC;AAED,GAAG,CAAC,yCAAK,iBAAG,uBAAU,CAAC,0BAAI;;","sources":["packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/overlays.css","packages/@adobe/spectrum-css-temp/components/popover/vars.css","packages/@react-spectrum/overlays/src/Modal.tsx","packages/@adobe/spectrum-css-temp/components/modal/vars.css","packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@adobe/spectrum-css-temp/components/underlay/vars.css","packages/@react-spectrum/overlays/src/Tray.tsx","packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n","/*\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 {DOMRef} from '@react-types/shared';\nimport {OpenTransition} from './OpenTransition';\nimport {OverlayProps} from '@react-types/overlays';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {useCallback, useState} from 'react';\nimport ReactDOM from 'react-dom';\n\nfunction Overlay(props: OverlayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isOpen, container, onEnter, onEntering, onEntered, onExit, onExiting, onExited} = props;\n let [exited, setExited] = useState(!isOpen);\n\n let handleEntered = useCallback(() => {\n setExited(false);\n if (onEntered) {\n onEntered();\n }\n }, [onEntered]);\n\n let handleExited = useCallback(() => {\n setExited(true);\n if (onExited) {\n onExited();\n }\n }, [onExited]);\n\n // Don't un-render the overlay while it's transitioning out.\n let mountOverlay = isOpen || !exited;\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n let contents = (\n <Provider ref={ref} UNSAFE_style={{background: 'transparent', isolation: 'isolate'}}>\n <OpenTransition\n in={isOpen}\n appear\n onExit={onExit}\n onExiting={onExiting}\n onExited={handleExited}\n onEnter={onEnter}\n onEntering={onEntering}\n onEntered={handleEntered}>\n {children}\n </OpenTransition>\n </Provider>\n );\n\n return ReactDOM.createPortal(contents, container || document.body);\n}\n\nlet _Overlay = React.forwardRef(Overlay);\nexport {_Overlay as Overlay};\n","/*\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 from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst OPEN_STATES = {\n entering: false,\n entered: true\n};\n\n/**\n * Timeout issues adding css animations to enter may be related to\n * https://github.com/reactjs/react-transition-group/issues/189 or\n * https://github.com/reactjs/react-transition-group/issues/22\n * my VM isn't good enough to debug accurately and get a better answer.\n *\n * As a result, use enter 0 so that is-open is applied once entered\n * it doesn't matter if we know when the css-animation is done on entering\n * for exiting though, give time for the css-animation to play\n * before removing from the DOM\n * **note** hitting esc bypasses exit animation for anyone testing.\n */\n\nexport function OpenTransition(props) {\n // Do not apply any transition if in chromatic.\n if (process.env.CHROMATIC) {\n return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));\n }\n\n return (\n <Transition timeout={{enter: 0, exit: 350}} {...props}>\n {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport {PlacementAxis, PopoverProps} from '@react-types/overlays';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/popover/vars.css';\nimport {useModal, useOverlay} from '@react-aria/overlays';\n\ninterface PopoverWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n placement?: PlacementAxis,\n arrowProps?: HTMLAttributes<HTMLElement>,\n hideArrow?: boolean,\n isOpen?: boolean,\n onClose?: () => void,\n shouldCloseOnBlur?: boolean,\n isKeyboardDismissDisabled?: boolean,\n isNonModal?: boolean,\n isDismissable?: boolean\n}\n\n/**\n * Arrow placement can be done pointing right or down because those paths start at 0, x or y. Because the\n * other two don't, they start at a fractional pixel value, it introduces rounding differences between browsers and\n * between display types (retina with subpixels vs not retina). By flipping them with CSS we can ensure that\n * the path always starts at 0 so that it perfectly overlaps the popover's border.\n * See bottom of file for more explanation.\n */\nlet arrowPlacement = {\n left: 'right',\n right: 'right',\n top: 'bottom',\n bottom: 'bottom'\n};\n\nfunction Popover(props: PopoverProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n placement,\n arrowProps,\n onClose,\n shouldCloseOnBlur,\n hideArrow,\n isKeyboardDismissDisabled,\n isNonModal,\n isDismissable = true,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n return (\n <Overlay {...otherProps}>\n <PopoverWrapper\n {...styleProps}\n ref={domRef}\n placement={placement}\n arrowProps={arrowProps}\n onClose={onClose}\n shouldCloseOnBlur={shouldCloseOnBlur}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow}\n isNonModal={isNonModal}\n isDismissable={isDismissable}>\n {children}\n </PopoverWrapper>\n </Overlay>\n );\n}\n\nconst PopoverWrapper = forwardRef((props: PopoverWrapperProps, ref: RefObject<HTMLDivElement>) => {\n let {\n children,\n placement = 'bottom',\n arrowProps,\n isOpen,\n hideArrow,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldCloseOnBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isKeyboardDismissDisabled,\n isNonModal,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isDismissable,\n ...otherProps\n } = props;\n let {overlayProps} = useOverlay({...props, isDismissable: isDismissable && isOpen}, ref);\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n return (\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Popover',\n `spectrum-Popover--${placement}`,\n {\n 'spectrum-Popover--withTip': !hideArrow,\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Popover',\n 'react-spectrum-Popover'\n ),\n otherProps.className\n )\n }\n role=\"presentation\"\n data-testid=\"popover\">\n {children}\n {hideArrow ? null : (\n <Arrow arrowProps={arrowProps} direction={arrowPlacement[placement]} />\n )}\n </div>\n );\n});\n\nlet ROOT_2 = Math.sqrt(2);\n\nfunction Arrow(props) {\n let [size, setSize] = useState(20);\n let [borderWidth, setBorderWidth] = useState(1);\n let ref = useRef();\n // get the css value for the tip size and divide it by 2 for this arrow implementation\n useLayoutEffect(() => {\n if (ref.current) {\n let spectrumTipWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-size');\n if (spectrumTipWidth !== '') {\n setSize(parseInt(spectrumTipWidth, 10) / 2);\n }\n\n let spectrumBorderWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-borderWidth');\n if (spectrumBorderWidth !== '') {\n setBorderWidth(parseInt(spectrumBorderWidth, 10));\n }\n }\n }, [ref]);\n\n let landscape = props.direction === 'top' || props.direction === 'bottom';\n let mirror = props.direction === 'left' || props.direction === 'top';\n\n let borderDiagonal = borderWidth * ROOT_2;\n let halfBorderDiagonal = borderDiagonal / 2;\n\n let secondary = 2 * size + 2 * borderDiagonal;\n let primary = size + borderDiagonal;\n\n let primaryStart = mirror ? primary : 0;\n let primaryEnd = mirror ? halfBorderDiagonal : primary - halfBorderDiagonal;\n\n let secondaryStart = halfBorderDiagonal;\n let secondaryMiddle = secondary / 2;\n let secondaryEnd = secondary - halfBorderDiagonal;\n\n let pathData = landscape ? [\n 'M', secondaryStart, primaryStart,\n 'L', secondaryMiddle, primaryEnd,\n 'L', secondaryEnd, primaryStart\n ] : [\n 'M', primaryStart, secondaryStart,\n 'L', primaryEnd, secondaryMiddle,\n 'L', primaryStart, secondaryEnd\n ];\n let arrowProps = props.arrowProps;\n\n /* use ceil because the svg needs to always accomodate the path inside it */\n return (\n <svg\n xmlns=\"http://www.w3.org/svg/2000\"\n width={Math.ceil(landscape ? secondary : primary)}\n height={Math.ceil(landscape ? primary : secondary)}\n style={props.style}\n className={classNames(styles, 'spectrum-Popover-tip')}\n ref={ref}\n {...arrowProps}>\n <path className={classNames(styles, 'spectrum-Popover-tip-triangle')} d={pathData.join(' ')} />\n </svg>\n );\n}\n\nlet _Popover = forwardRef(Popover);\nexport {_Popover as Popover};\n\n/**\n * More explanation on popover tips.\n * - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid.\n * This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom.\n * - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border.\n * This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border.\n * - I tried getting the client bounding box and setting the svg to that partial pixel value\n * This didn't work because again the issue was inside the svg\n * - I didn't try drawing the svg backwards\n * This could still be tried\n * - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded\n * This seems to have done the trick.\n */\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n.spectrum-Popover {\n /* This makes the contents of popovers focusable immediately, without waiting\n a frame for animations to start. */\n &.react-spectrum-Popover {\n visibility: visible;\n }\n\n .spectrum-Dialog-content {\n max-height: initial;\n }\n}\n\n.spectrum-Modal-wrapper.react-spectrum-Modal-wrapper,\n.spectrum-Modal.react-spectrum-Modal {\n visibility: visible;\n}\n\n.spectrum-Tray.react-spectrum-Tray {\n visibility: visible;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {ModalProps} from '@react-types/overlays';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface ModalWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, type, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay(props, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <ModalWrapper\n {...styleProps}\n onClose={onClose}\n type={type}\n ref={domRef}\n overlayProps={overlayProps}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n}\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: RefObject<HTMLDivElement>) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children, isOpen, type, overlayProps, ...otherProps} = props;\n let typeVariant = typeMap[type];\n\n usePreventScroll();\n let {modalProps} = useModal();\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n otherProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n return (\n <div className={wrapperClassName} style={style}>\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Modal = forwardRef(Modal);\nexport {_Modal as Modal};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean\n}\n\nexport function Underlay({isOpen}: UnderlayProps) {\n return (\n <div className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen})} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {TrayProps} from '@react-types/overlays';\nimport trayStyles from '@adobe/spectrum-css-temp/components/tray/vars.css';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface TrayWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n isFixedHeight?: boolean,\n isNonModal?: boolean,\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Tray(props: TrayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, isFixedHeight, isNonModal, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay({...props, isDismissable: true}, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <TrayWrapper\n {...styleProps}\n onClose={onClose}\n ref={domRef}\n overlayProps={overlayProps}\n isFixedHeight={isFixedHeight}\n isNonModal={isNonModal}>\n {children}\n </TrayWrapper>\n </Overlay>\n );\n}\n\nlet TrayWrapper = forwardRef(function (props: TrayWrapperProps, ref: RefObject<HTMLDivElement>) {\n let {\n children,\n isOpen,\n isFixedHeight,\n isNonModal,\n overlayProps,\n ...otherProps\n } = props;\n usePreventScroll();\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n // We need to measure the window's height in JS rather than using percentages in CSS\n // so that contents (e.g. menu) can inherit the max-height properly. Using percentages\n // does not work properly because there is nothing to base the percentage on.\n // We cannot use vh units because mobile browsers adjust the window height dynamically\n // when the address bar/bottom toolbars show and hide on scroll and vh units are fixed.\n // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard\n // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.\n let viewport = useViewportSize();\n let wrapperStyle: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n let wrapperClassName = classNames(\n trayStyles,\n 'spectrum-Tray-wrapper'\n );\n\n let className = classNames(\n trayStyles,\n 'spectrum-Tray',\n {\n 'is-open': isOpen,\n 'spectrum-Tray--fixedHeight': isFixedHeight\n },\n classNames(\n overrideStyles,\n 'spectrum-Tray',\n 'react-spectrum-Tray'\n ),\n otherProps.className\n );\n\n let domProps = mergeProps(otherProps, overlayProps);\n\n return (\n <div className={wrapperClassName} style={wrapperStyle}>\n <div\n {...domProps}\n {...modalProps}\n className={className}\n ref={ref}\n data-testid=\"tray\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Tray = forwardRef(Tray);\nexport {_Tray as Tray};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./main.css";
2
2
  import {Provider as $fQOb3$Provider} from "@react-spectrum/provider";
3
- import $fQOb3$react, {useState as $fQOb3$useState, useCallback as $fQOb3$useCallback, forwardRef as $fQOb3$forwardRef, useRef as $fQOb3$useRef, useEffect as $fQOb3$useEffect} from "react";
3
+ import $fQOb3$react, {useState as $fQOb3$useState, useCallback as $fQOb3$useCallback, forwardRef as $fQOb3$forwardRef, useRef as $fQOb3$useRef} from "react";
4
4
  import $fQOb3$reactdom from "react-dom";
5
5
  import $fQOb3$reacttransitiongroupTransition from "react-transition-group/Transition";
6
6
  import {useDOMRef as $fQOb3$useDOMRef, useStyleProps as $fQOb3$useStyleProps, classNames as $fQOb3$classNames} from "@react-spectrum/utils";
@@ -26,6 +26,7 @@ const $bc765a7a041310da$var$OPEN_STATES = {
26
26
  entered: true
27
27
  };
28
28
  function $bc765a7a041310da$export$b847a40ee92eff38(props) {
29
+ var child1;
29
30
  return(/*#__PURE__*/ $fQOb3$react.createElement($fQOb3$reacttransitiongroupTransition, {
30
31
  timeout: {
31
32
  enter: 0,
@@ -431,24 +432,8 @@ let $1afc87f3d16a5a1c$var$TrayWrapper = /*#__PURE__*/ $fQOb3$forwardRef(function
431
432
  // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard
432
433
  // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.
433
434
  let viewport = $fQOb3$useViewportSize();
434
- let [height, setHeight] = $fQOb3$useState(viewport.height);
435
- let timeoutRef = $fQOb3$useRef();
436
- $fQOb3$useEffect(()=>{
437
- clearTimeout(timeoutRef.current);
438
- // When the height is decreasing, and the keyboard is visible
439
- // (visual viewport smaller than layout viewport), delay setting
440
- // the new max height until after the animation is complete
441
- // so that there isn't an empty space under the tray briefly.
442
- if (viewport.height < height && viewport.height < window.innerHeight) timeoutRef.current = setTimeout(()=>{
443
- setHeight(viewport.height);
444
- }, 500);
445
- else setHeight(viewport.height);
446
- }, [
447
- height,
448
- viewport.height
449
- ]);
450
435
  let wrapperStyle = {
451
- '--spectrum-visual-viewport-height': height + 'px'
436
+ '--spectrum-visual-viewport-height': viewport.height + 'px'
452
437
  };
453
438
  let wrapperClassName = $fQOb3$classNames((/*@__PURE__*/$parcel$interopDefault($930b2f4095bb11d1$exports)), 'spectrum-Tray-wrapper');
454
439
  let className = $fQOb3$classNames((/*@__PURE__*/$parcel$interopDefault($930b2f4095bb11d1$exports)), 'spectrum-Tray', {
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEeA,KAAK,CAAC,iCAAW,GAAG,CAAC;IACnB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,IAAI;AACf,CAAC;SAee,yCAAc,CAAC,KAAK,EAAE,CAAC;IACrC,MAAM,0CACH,qCAAU;QAAC,OAAO,EAAE,CAAC;YAAA,KAAK,EAAE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Q,CAAC,MAAM;QAC3B,CAAC,EAAE,GAAG;aAEN,SAAS,CAAC,QAAQ,CAAC,MAAM;IAE7B,CAAC,EAAE,CAAC;QAAA,MAAM;QAAE,QAAQ,CAAC,MAAM;IAAA,CAAC;IAE5B,GAAG,CAAC,YAAY,GAAQ,CAAC;QACvB,CAAmC,oCAAE,MAAM,GAAG,CAAI;IACpD,CAAC;IAED,GAAG,CAAC,gBAAgB,GAAG,iBAAU,CAC/B,gEAAU,EACV,CAAuB;IAGzB,GAAG,CAAC,SAAS,GAAG,iBAAU,CACxB,gEAAU,EACV,CAAe,gBACf,CAAC;QACC,CAAS,UAAE,MAAM;QACjB,CAA4B,6BAAE,aAAa;IAC7C,CAAC,EACD,iBAAU,CACR,gEAAc,EACd,CAAe,gBACf,CAAqB,uBAEvB,UAAU,CAAC,SAAS;IAGtB,GAAG,CAAC,QAAQ,GAAG,iBAAU,CAAC,UAAU,EAAE,YAAY;IAElD,MAAM,0CACH,CAAG;QAAC,SAAS,EAAE,gBAAgB;QAAE,KAAK,EAAE,YAAY;gDAClD,CAAG;WACE,QAAQ;WACR,UAAU;QACd,SAAS,EAAE,SAAS;QACpB,GAAG,EAAE,GAAG;QACR,CAAW,cAAC,CAAM;OACjB,QAAQ;AAIjB,CAAC;AAED,GAAG,CAAC,yCAAK,iBAAG,iBAAU,CAAC,0BAAI;;","sources":["packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/overlays.css","packages/@adobe/spectrum-css-temp/components/popover/vars.css","packages/@react-spectrum/overlays/src/Modal.tsx","packages/@adobe/spectrum-css-temp/components/modal/vars.css","packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@adobe/spectrum-css-temp/components/underlay/vars.css","packages/@react-spectrum/overlays/src/Tray.tsx","packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n","/*\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 {DOMRef} from '@react-types/shared';\nimport {OpenTransition} from './OpenTransition';\nimport {OverlayProps} from '@react-types/overlays';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {useCallback, useState} from 'react';\nimport ReactDOM from 'react-dom';\n\nfunction Overlay(props: OverlayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isOpen, container, onEnter, onEntering, onEntered, onExit, onExiting, onExited} = props;\n let [exited, setExited] = useState(!isOpen);\n\n let handleEntered = useCallback(() => {\n setExited(false);\n if (onEntered) {\n onEntered();\n }\n }, [onEntered]);\n\n let handleExited = useCallback(() => {\n setExited(true);\n if (onExited) {\n onExited();\n }\n }, [onExited]);\n\n // Don't un-render the overlay while it's transitioning out.\n let mountOverlay = isOpen || !exited;\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n let contents = (\n <Provider ref={ref} UNSAFE_style={{background: 'transparent', isolation: 'isolate'}}>\n <OpenTransition\n in={isOpen}\n appear\n onExit={onExit}\n onExiting={onExiting}\n onExited={handleExited}\n onEnter={onEnter}\n onEntering={onEntering}\n onEntered={handleEntered}>\n {children}\n </OpenTransition>\n </Provider>\n );\n\n return ReactDOM.createPortal(contents, container || document.body);\n}\n\nlet _Overlay = React.forwardRef(Overlay);\nexport {_Overlay as Overlay};\n","/*\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 from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst OPEN_STATES = {\n entering: false,\n entered: true\n};\n\n/**\n * Timeout issues adding css animations to enter may be related to\n * https://github.com/reactjs/react-transition-group/issues/189 or\n * https://github.com/reactjs/react-transition-group/issues/22\n * my VM isn't good enough to debug accurately and get a better answer.\n *\n * As a result, use enter 0 so that is-open is applied once entered\n * it doesn't matter if we know when the css-animation is done on entering\n * for exiting though, give time for the css-animation to play\n * before removing from the DOM\n * **note** hitting esc bypasses exit animation for anyone testing.\n */\n\nexport function OpenTransition(props) {\n return (\n <Transition timeout={{enter: 0, exit: 350}} {...props}>\n {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport {PlacementAxis, PopoverProps} from '@react-types/overlays';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/popover/vars.css';\nimport {useModal, useOverlay} from '@react-aria/overlays';\n\ninterface PopoverWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n placement?: PlacementAxis,\n arrowProps?: HTMLAttributes<HTMLElement>,\n hideArrow?: boolean,\n isOpen?: boolean,\n onClose?: () => void,\n shouldCloseOnBlur?: boolean,\n isKeyboardDismissDisabled?: boolean,\n isNonModal?: boolean,\n isDismissable?: boolean\n}\n\n/**\n * Arrow placement can be done pointing right or down because those paths start at 0, x or y. Because the\n * other two don't, they start at a fractional pixel value, it introduces rounding differences between browsers and\n * between display types (retina with subpixels vs not retina). By flipping them with CSS we can ensure that\n * the path always starts at 0 so that it perfectly overlaps the popover's border.\n * See bottom of file for more explanation.\n */\nlet arrowPlacement = {\n left: 'right',\n right: 'right',\n top: 'bottom',\n bottom: 'bottom'\n};\n\nfunction Popover(props: PopoverProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n placement,\n arrowProps,\n onClose,\n shouldCloseOnBlur,\n hideArrow,\n isKeyboardDismissDisabled,\n isNonModal,\n isDismissable = true,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n return (\n <Overlay {...otherProps}>\n <PopoverWrapper\n {...styleProps}\n ref={domRef}\n placement={placement}\n arrowProps={arrowProps}\n onClose={onClose}\n shouldCloseOnBlur={shouldCloseOnBlur}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow}\n isNonModal={isNonModal}\n isDismissable={isDismissable}>\n {children}\n </PopoverWrapper>\n </Overlay>\n );\n}\n\nconst PopoverWrapper = forwardRef((props: PopoverWrapperProps, ref: RefObject<HTMLDivElement>) => {\n let {\n children,\n placement = 'bottom',\n arrowProps,\n isOpen,\n hideArrow,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldCloseOnBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isKeyboardDismissDisabled,\n isNonModal,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isDismissable,\n ...otherProps\n } = props;\n let {overlayProps} = useOverlay({...props, isDismissable: isDismissable && isOpen}, ref);\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n return (\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Popover',\n `spectrum-Popover--${placement}`,\n {\n 'spectrum-Popover--withTip': !hideArrow,\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Popover',\n 'react-spectrum-Popover'\n ),\n otherProps.className\n )\n }\n role=\"presentation\"\n data-testid=\"popover\">\n {children}\n {hideArrow ? null : (\n <Arrow arrowProps={arrowProps} direction={arrowPlacement[placement]} />\n )}\n </div>\n );\n});\n\nlet ROOT_2 = Math.sqrt(2);\n\nfunction Arrow(props) {\n let [size, setSize] = useState(20);\n let [borderWidth, setBorderWidth] = useState(1);\n let ref = useRef();\n // get the css value for the tip size and divide it by 2 for this arrow implementation\n useLayoutEffect(() => {\n if (ref.current) {\n let spectrumTipWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-size');\n if (spectrumTipWidth !== '') {\n setSize(parseInt(spectrumTipWidth, 10) / 2);\n }\n\n let spectrumBorderWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-borderWidth');\n if (spectrumBorderWidth !== '') {\n setBorderWidth(parseInt(spectrumBorderWidth, 10));\n }\n }\n }, [ref]);\n\n let landscape = props.direction === 'top' || props.direction === 'bottom';\n let mirror = props.direction === 'left' || props.direction === 'top';\n\n let borderDiagonal = borderWidth * ROOT_2;\n let halfBorderDiagonal = borderDiagonal / 2;\n\n let secondary = 2 * size + 2 * borderDiagonal;\n let primary = size + borderDiagonal;\n\n let primaryStart = mirror ? primary : 0;\n let primaryEnd = mirror ? halfBorderDiagonal : primary - halfBorderDiagonal;\n\n let secondaryStart = halfBorderDiagonal;\n let secondaryMiddle = secondary / 2;\n let secondaryEnd = secondary - halfBorderDiagonal;\n\n let pathData = landscape ? [\n 'M', secondaryStart, primaryStart,\n 'L', secondaryMiddle, primaryEnd,\n 'L', secondaryEnd, primaryStart\n ] : [\n 'M', primaryStart, secondaryStart,\n 'L', primaryEnd, secondaryMiddle,\n 'L', primaryStart, secondaryEnd\n ];\n let arrowProps = props.arrowProps;\n\n /* use ceil because the svg needs to always accomodate the path inside it */\n return (\n <svg\n xmlns=\"http://www.w3.org/svg/2000\"\n width={Math.ceil(landscape ? secondary : primary)}\n height={Math.ceil(landscape ? primary : secondary)}\n style={props.style}\n className={classNames(styles, 'spectrum-Popover-tip')}\n ref={ref}\n {...arrowProps}>\n <path className={classNames(styles, 'spectrum-Popover-tip-triangle')} d={pathData.join(' ')} />\n </svg>\n );\n}\n\nlet _Popover = forwardRef(Popover);\nexport {_Popover as Popover};\n\n/**\n * More explanation on popover tips.\n * - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid.\n * This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom.\n * - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border.\n * This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border.\n * - I tried getting the client bounding box and setting the svg to that partial pixel value\n * This didn't work because again the issue was inside the svg\n * - I didn't try drawing the svg backwards\n * This could still be tried\n * - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded\n * This seems to have done the trick.\n */\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n.spectrum-Popover {\n /* This makes the contents of popovers focusable immediately, without waiting\n a frame for animations to start. */\n &.react-spectrum-Popover {\n visibility: visible;\n }\n\n .spectrum-Dialog-content {\n max-height: initial;\n }\n}\n\n.spectrum-Modal-wrapper.react-spectrum-Modal-wrapper,\n.spectrum-Modal.react-spectrum-Modal {\n visibility: visible;\n}\n\n.spectrum-Tray.react-spectrum-Tray {\n visibility: visible;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {ModalProps} from '@react-types/overlays';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface ModalWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, type, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay(props, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <ModalWrapper\n {...styleProps}\n onClose={onClose}\n type={type}\n ref={domRef}\n overlayProps={overlayProps}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n}\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: RefObject<HTMLDivElement>) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children, isOpen, type, overlayProps, ...otherProps} = props;\n let typeVariant = typeMap[type];\n\n usePreventScroll();\n let {modalProps} = useModal();\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n otherProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n return (\n <div className={wrapperClassName} style={style}>\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Modal = forwardRef(Modal);\nexport {_Modal as Modal};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean\n}\n\nexport function Underlay({isOpen}: UnderlayProps) {\n return (\n <div className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen})} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useEffect, useRef, useState} from 'react';\nimport {TrayProps} from '@react-types/overlays';\nimport trayStyles from '@adobe/spectrum-css-temp/components/tray/vars.css';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface TrayWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n isFixedHeight?: boolean,\n isNonModal?: boolean,\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Tray(props: TrayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, isFixedHeight, isNonModal, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay({...props, isDismissable: true}, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <TrayWrapper\n {...styleProps}\n onClose={onClose}\n ref={domRef}\n overlayProps={overlayProps}\n isFixedHeight={isFixedHeight}\n isNonModal={isNonModal}>\n {children}\n </TrayWrapper>\n </Overlay>\n );\n}\n\nlet TrayWrapper = forwardRef(function (props: TrayWrapperProps, ref: RefObject<HTMLDivElement>) {\n let {\n children,\n isOpen,\n isFixedHeight,\n isNonModal,\n overlayProps,\n ...otherProps\n } = props;\n usePreventScroll();\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n // We need to measure the window's height in JS rather than using percentages in CSS\n // so that contents (e.g. menu) can inherit the max-height properly. Using percentages\n // does not work properly because there is nothing to base the percentage on.\n // We cannot use vh units because mobile browsers adjust the window height dynamically\n // when the address bar/bottom toolbars show and hide on scroll and vh units are fixed.\n // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard\n // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.\n let viewport = useViewportSize();\n let [height, setHeight] = useState(viewport.height);\n let timeoutRef = useRef<any>();\n\n useEffect(() => {\n clearTimeout(timeoutRef.current);\n\n // When the height is decreasing, and the keyboard is visible\n // (visual viewport smaller than layout viewport), delay setting\n // the new max height until after the animation is complete\n // so that there isn't an empty space under the tray briefly.\n if (viewport.height < height && viewport.height < window.innerHeight) {\n timeoutRef.current = setTimeout(() => {\n setHeight(viewport.height);\n }, 500);\n } else {\n setHeight(viewport.height);\n }\n }, [height, viewport.height]);\n\n let wrapperStyle: any = {\n '--spectrum-visual-viewport-height': height + 'px'\n };\n\n let wrapperClassName = classNames(\n trayStyles,\n 'spectrum-Tray-wrapper'\n );\n\n let className = classNames(\n trayStyles,\n 'spectrum-Tray',\n {\n 'is-open': isOpen,\n 'spectrum-Tray--fixedHeight': isFixedHeight\n },\n classNames(\n overrideStyles,\n 'spectrum-Tray',\n 'react-spectrum-Tray'\n ),\n otherProps.className\n );\n\n let domProps = mergeProps(otherProps, overlayProps);\n\n return (\n <div className={wrapperClassName} style={wrapperStyle}>\n <div\n {...domProps}\n {...modalProps}\n className={className}\n ref={ref}\n data-testid=\"tray\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Tray = forwardRef(Tray);\nexport {_Tray as Tray};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AEeA,KAAK,CAAC,iCAAW,GAAG,CAAC;IACnB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,IAAI;AACf,CAAC;SAee,yCAAc,CAAC,KAAK,EAAE,CAAC;QAGO,MAAK;IAGjD,MAAM,0CACH,qCAAU;QAAC,OAAO,EAAE,CAAC;YAAA,KAAK,EAAE,CAAC;YAAE,IAAI,EAAE,GAAG;QAAA,CAAC;WAAM,KAAK;QACjD,KAAK,GAAK,YAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAE,KAAK,GAAI,KAAK,kBAAI,YAAK,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;gBAAA,MAAM,IAAI,iCAAW,CAAC,KAAK;YAAC,CAAC;;;AAG/H,CAAC;;;;;;SDzBQ,6BAAO,CAAC,KAAmB,EAAE,GAA2B,EAAE,CAAC;IAClE,GAAG,CAAC,CAAC,WAAA,QAAQ,WAAE,MAAM,cAAE,SAAS,YAAE,OAAO,eAAE,UAAU,cAAE,SAAS,WAAE,MAAM,cAAE,SAAS,aAAE,QAAQ,EAAA,CAAC,GAAG,KAAK;IACtG,GAAG,EAAE,MAAM,EAAE,SAAS,IAAI,eAAQ,EAAE,MAAM;IAE1C,GAAG,CAAC,aAAa,GAAG,kBAAW,KAAO,CAAC;QACrC,SAAS,CAAC,KAAK;QACf,EA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F,oFAAsF;IACtF,EAAuF,AAAvF,qFAAuF;IACvF,EAA0F,AAA1F,wFAA0F;IAC1F,EAA2F,AAA3F,yFAA2F;IAC3F,GAAG,CAAC,QAAQ,GAAG,sBAAe;IAC9B,GAAG,CAAC,YAAY,GAAQ,CAAC;QACvB,CAAmC,oCAAE,QAAQ,CAAC,MAAM,GAAG,CAAI;IAC7D,CAAC;IAED,GAAG,CAAC,gBAAgB,GAAG,iBAAU,CAC/B,gEAAU,EACV,CAAuB;IAGzB,GAAG,CAAC,SAAS,GAAG,iBAAU,CACxB,gEAAU,EACV,CAAe,gBACf,CAAC;QACC,CAAS,UAAE,MAAM;QACjB,CAA4B,6BAAE,aAAa;IAC7C,CAAC,EACD,iBAAU,CACR,gEAAc,EACd,CAAe,gBACf,CAAqB,uBAEvB,UAAU,CAAC,SAAS;IAGtB,GAAG,CAAC,QAAQ,GAAG,iBAAU,CAAC,UAAU,EAAE,YAAY;IAElD,MAAM,0CACH,CAAG;QAAC,SAAS,EAAE,gBAAgB;QAAE,KAAK,EAAE,YAAY;gDAClD,CAAG;WACE,QAAQ;WACR,UAAU;QACd,SAAS,EAAE,SAAS;QACpB,GAAG,EAAE,GAAG;QACR,CAAW,cAAC,CAAM;OACjB,QAAQ;AAIjB,CAAC;AAED,GAAG,CAAC,yCAAK,iBAAG,iBAAU,CAAC,0BAAI;;","sources":["packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/overlays.css","packages/@adobe/spectrum-css-temp/components/popover/vars.css","packages/@react-spectrum/overlays/src/Modal.tsx","packages/@adobe/spectrum-css-temp/components/modal/vars.css","packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@adobe/spectrum-css-temp/components/underlay/vars.css","packages/@react-spectrum/overlays/src/Tray.tsx","packages/@adobe/spectrum-css-temp/components/tray/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n","/*\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 {DOMRef} from '@react-types/shared';\nimport {OpenTransition} from './OpenTransition';\nimport {OverlayProps} from '@react-types/overlays';\nimport {Provider} from '@react-spectrum/provider';\nimport React, {useCallback, useState} from 'react';\nimport ReactDOM from 'react-dom';\n\nfunction Overlay(props: OverlayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, isOpen, container, onEnter, onEntering, onEntered, onExit, onExiting, onExited} = props;\n let [exited, setExited] = useState(!isOpen);\n\n let handleEntered = useCallback(() => {\n setExited(false);\n if (onEntered) {\n onEntered();\n }\n }, [onEntered]);\n\n let handleExited = useCallback(() => {\n setExited(true);\n if (onExited) {\n onExited();\n }\n }, [onExited]);\n\n // Don't un-render the overlay while it's transitioning out.\n let mountOverlay = isOpen || !exited;\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n let contents = (\n <Provider ref={ref} UNSAFE_style={{background: 'transparent', isolation: 'isolate'}}>\n <OpenTransition\n in={isOpen}\n appear\n onExit={onExit}\n onExiting={onExiting}\n onExited={handleExited}\n onEnter={onEnter}\n onEntering={onEntering}\n onEntered={handleEntered}>\n {children}\n </OpenTransition>\n </Provider>\n );\n\n return ReactDOM.createPortal(contents, container || document.body);\n}\n\nlet _Overlay = React.forwardRef(Overlay);\nexport {_Overlay as Overlay};\n","/*\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 from 'react';\nimport Transition from 'react-transition-group/Transition';\n\nconst OPEN_STATES = {\n entering: false,\n entered: true\n};\n\n/**\n * Timeout issues adding css animations to enter may be related to\n * https://github.com/reactjs/react-transition-group/issues/189 or\n * https://github.com/reactjs/react-transition-group/issues/22\n * my VM isn't good enough to debug accurately and get a better answer.\n *\n * As a result, use enter 0 so that is-open is applied once entered\n * it doesn't matter if we know when the css-animation is done on entering\n * for exiting though, give time for the css-animation to play\n * before removing from the DOM\n * **note** hitting esc bypasses exit animation for anyone testing.\n */\n\nexport function OpenTransition(props) {\n // Do not apply any transition if in chromatic.\n if (process.env.CHROMATIC) {\n return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));\n }\n\n return (\n <Transition timeout={{enter: 0, exit: 350}} {...props}>\n {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}\n </Transition>\n );\n}\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport {PlacementAxis, PopoverProps} from '@react-types/overlays';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/popover/vars.css';\nimport {useModal, useOverlay} from '@react-aria/overlays';\n\ninterface PopoverWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n placement?: PlacementAxis,\n arrowProps?: HTMLAttributes<HTMLElement>,\n hideArrow?: boolean,\n isOpen?: boolean,\n onClose?: () => void,\n shouldCloseOnBlur?: boolean,\n isKeyboardDismissDisabled?: boolean,\n isNonModal?: boolean,\n isDismissable?: boolean\n}\n\n/**\n * Arrow placement can be done pointing right or down because those paths start at 0, x or y. Because the\n * other two don't, they start at a fractional pixel value, it introduces rounding differences between browsers and\n * between display types (retina with subpixels vs not retina). By flipping them with CSS we can ensure that\n * the path always starts at 0 so that it perfectly overlaps the popover's border.\n * See bottom of file for more explanation.\n */\nlet arrowPlacement = {\n left: 'right',\n right: 'right',\n top: 'bottom',\n bottom: 'bottom'\n};\n\nfunction Popover(props: PopoverProps, ref: DOMRef<HTMLDivElement>) {\n let {\n children,\n placement,\n arrowProps,\n onClose,\n shouldCloseOnBlur,\n hideArrow,\n isKeyboardDismissDisabled,\n isNonModal,\n isDismissable = true,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n return (\n <Overlay {...otherProps}>\n <PopoverWrapper\n {...styleProps}\n ref={domRef}\n placement={placement}\n arrowProps={arrowProps}\n onClose={onClose}\n shouldCloseOnBlur={shouldCloseOnBlur}\n isKeyboardDismissDisabled={isKeyboardDismissDisabled}\n hideArrow={hideArrow}\n isNonModal={isNonModal}\n isDismissable={isDismissable}>\n {children}\n </PopoverWrapper>\n </Overlay>\n );\n}\n\nconst PopoverWrapper = forwardRef((props: PopoverWrapperProps, ref: RefObject<HTMLDivElement>) => {\n let {\n children,\n placement = 'bottom',\n arrowProps,\n isOpen,\n hideArrow,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n shouldCloseOnBlur,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isKeyboardDismissDisabled,\n isNonModal,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n isDismissable,\n ...otherProps\n } = props;\n let {overlayProps} = useOverlay({...props, isDismissable: isDismissable && isOpen}, ref);\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n return (\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={\n classNames(\n styles,\n 'spectrum-Popover',\n `spectrum-Popover--${placement}`,\n {\n 'spectrum-Popover--withTip': !hideArrow,\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Popover',\n 'react-spectrum-Popover'\n ),\n otherProps.className\n )\n }\n role=\"presentation\"\n data-testid=\"popover\">\n {children}\n {hideArrow ? null : (\n <Arrow arrowProps={arrowProps} direction={arrowPlacement[placement]} />\n )}\n </div>\n );\n});\n\nlet ROOT_2 = Math.sqrt(2);\n\nfunction Arrow(props) {\n let [size, setSize] = useState(20);\n let [borderWidth, setBorderWidth] = useState(1);\n let ref = useRef();\n // get the css value for the tip size and divide it by 2 for this arrow implementation\n useLayoutEffect(() => {\n if (ref.current) {\n let spectrumTipWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-size');\n if (spectrumTipWidth !== '') {\n setSize(parseInt(spectrumTipWidth, 10) / 2);\n }\n\n let spectrumBorderWidth = window.getComputedStyle(ref.current)\n .getPropertyValue('--spectrum-popover-tip-borderWidth');\n if (spectrumBorderWidth !== '') {\n setBorderWidth(parseInt(spectrumBorderWidth, 10));\n }\n }\n }, [ref]);\n\n let landscape = props.direction === 'top' || props.direction === 'bottom';\n let mirror = props.direction === 'left' || props.direction === 'top';\n\n let borderDiagonal = borderWidth * ROOT_2;\n let halfBorderDiagonal = borderDiagonal / 2;\n\n let secondary = 2 * size + 2 * borderDiagonal;\n let primary = size + borderDiagonal;\n\n let primaryStart = mirror ? primary : 0;\n let primaryEnd = mirror ? halfBorderDiagonal : primary - halfBorderDiagonal;\n\n let secondaryStart = halfBorderDiagonal;\n let secondaryMiddle = secondary / 2;\n let secondaryEnd = secondary - halfBorderDiagonal;\n\n let pathData = landscape ? [\n 'M', secondaryStart, primaryStart,\n 'L', secondaryMiddle, primaryEnd,\n 'L', secondaryEnd, primaryStart\n ] : [\n 'M', primaryStart, secondaryStart,\n 'L', primaryEnd, secondaryMiddle,\n 'L', primaryStart, secondaryEnd\n ];\n let arrowProps = props.arrowProps;\n\n /* use ceil because the svg needs to always accomodate the path inside it */\n return (\n <svg\n xmlns=\"http://www.w3.org/svg/2000\"\n width={Math.ceil(landscape ? secondary : primary)}\n height={Math.ceil(landscape ? primary : secondary)}\n style={props.style}\n className={classNames(styles, 'spectrum-Popover-tip')}\n ref={ref}\n {...arrowProps}>\n <path className={classNames(styles, 'spectrum-Popover-tip-triangle')} d={pathData.join(' ')} />\n </svg>\n );\n}\n\nlet _Popover = forwardRef(Popover);\nexport {_Popover as Popover};\n\n/**\n * More explanation on popover tips.\n * - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid.\n * This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom.\n * - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border.\n * This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border.\n * - I tried getting the client bounding box and setting the svg to that partial pixel value\n * This didn't work because again the issue was inside the svg\n * - I didn't try drawing the svg backwards\n * This could still be tried\n * - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded\n * This seems to have done the trick.\n */\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n.spectrum-Popover {\n /* This makes the contents of popovers focusable immediately, without waiting\n a frame for animations to start. */\n &.react-spectrum-Popover {\n visibility: visible;\n }\n\n .spectrum-Dialog-content {\n max-height: initial;\n }\n}\n\n.spectrum-Modal-wrapper.react-spectrum-Modal-wrapper,\n.spectrum-Modal.react-spectrum-Modal {\n visibility: visible;\n}\n\n.spectrum-Tray.react-spectrum-Tray {\n visibility: visible;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {ModalProps} from '@react-types/overlays';\nimport modalStyles from '@adobe/spectrum-css-temp/components/modal/vars.css';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface ModalWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Modal(props: ModalProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, type, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay(props, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <ModalWrapper\n {...styleProps}\n onClose={onClose}\n type={type}\n ref={domRef}\n overlayProps={overlayProps}>\n {children}\n </ModalWrapper>\n </Overlay>\n );\n}\n\nlet typeMap = {\n fullscreen: 'fullscreen',\n fullscreenTakeover: 'fullscreenTakeover'\n};\n\nlet ModalWrapper = forwardRef(function (props: ModalWrapperProps, ref: RefObject<HTMLDivElement>) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {children, isOpen, type, overlayProps, ...otherProps} = props;\n let typeVariant = typeMap[type];\n\n usePreventScroll();\n let {modalProps} = useModal();\n\n let wrapperClassName = classNames(\n modalStyles,\n 'spectrum-Modal-wrapper',\n classNames(\n overrideStyles,\n 'spectrum-Modal-wrapper',\n 'react-spectrum-Modal-wrapper'\n )\n );\n\n let modalClassName = classNames(\n modalStyles,\n 'spectrum-Modal',\n {\n 'is-open': isOpen\n },\n classNames(\n overrideStyles,\n 'spectrum-Modal',\n 'react-spectrum-Modal'\n ),\n {[`spectrum-Modal--${typeVariant}`]: typeVariant},\n otherProps.className\n );\n\n let viewport = useViewportSize();\n let style: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n return (\n <div className={wrapperClassName} style={style}>\n <div\n {...mergeProps(otherProps, overlayProps, modalProps)}\n ref={ref}\n className={modalClassName}\n data-testid=\"modal\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Modal = forwardRef(Modal);\nexport {_Modal as Modal};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames} from '@react-spectrum/utils';\nimport React from 'react';\nimport underlayStyles from '@adobe/spectrum-css-temp/components/underlay/vars.css';\n\ninterface UnderlayProps {\n isOpen?: boolean\n}\n\nexport function Underlay({isOpen}: UnderlayProps) {\n return (\n <div className={classNames(underlayStyles, 'spectrum-Underlay', {'is-open': isOpen})} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {mergeProps, useViewportSize} from '@react-aria/utils';\nimport {Overlay} from './Overlay';\nimport overrideStyles from './overlays.css';\nimport React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';\nimport {TrayProps} from '@react-types/overlays';\nimport trayStyles from '@adobe/spectrum-css-temp/components/tray/vars.css';\nimport {Underlay} from './Underlay';\nimport {useModal, useOverlay, usePreventScroll} from '@react-aria/overlays';\n\ninterface TrayWrapperProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode,\n isOpen?: boolean,\n onClose?: () => void,\n isFixedHeight?: boolean,\n isNonModal?: boolean,\n overlayProps: HTMLAttributes<HTMLElement>\n}\n\nfunction Tray(props: TrayProps, ref: DOMRef<HTMLDivElement>) {\n let {children, onClose, isFixedHeight, isNonModal, ...otherProps} = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(props);\n\n let {overlayProps, underlayProps} = useOverlay({...props, isDismissable: true}, domRef);\n\n return (\n <Overlay {...otherProps}>\n <Underlay {...underlayProps} />\n <TrayWrapper\n {...styleProps}\n onClose={onClose}\n ref={domRef}\n overlayProps={overlayProps}\n isFixedHeight={isFixedHeight}\n isNonModal={isNonModal}>\n {children}\n </TrayWrapper>\n </Overlay>\n );\n}\n\nlet TrayWrapper = forwardRef(function (props: TrayWrapperProps, ref: RefObject<HTMLDivElement>) {\n let {\n children,\n isOpen,\n isFixedHeight,\n isNonModal,\n overlayProps,\n ...otherProps\n } = props;\n usePreventScroll();\n let {modalProps} = useModal({\n isDisabled: isNonModal\n });\n\n // We need to measure the window's height in JS rather than using percentages in CSS\n // so that contents (e.g. menu) can inherit the max-height properly. Using percentages\n // does not work properly because there is nothing to base the percentage on.\n // We cannot use vh units because mobile browsers adjust the window height dynamically\n // when the address bar/bottom toolbars show and hide on scroll and vh units are fixed.\n // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard\n // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.\n let viewport = useViewportSize();\n let wrapperStyle: any = {\n '--spectrum-visual-viewport-height': viewport.height + 'px'\n };\n\n let wrapperClassName = classNames(\n trayStyles,\n 'spectrum-Tray-wrapper'\n );\n\n let className = classNames(\n trayStyles,\n 'spectrum-Tray',\n {\n 'is-open': isOpen,\n 'spectrum-Tray--fixedHeight': isFixedHeight\n },\n classNames(\n overrideStyles,\n 'spectrum-Tray',\n 'react-spectrum-Tray'\n ),\n otherProps.className\n );\n\n let domProps = mergeProps(otherProps, overlayProps);\n\n return (\n <div className={wrapperClassName} style={wrapperStyle}>\n <div\n {...domProps}\n {...modalProps}\n className={className}\n ref={ref}\n data-testid=\"tray\">\n {children}\n </div>\n </div>\n );\n});\n\nlet _Tray = forwardRef(Tray);\nexport {_Tray as Tray};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ import React from "react";
12
12
  * before removing from the DOM
13
13
  * **note** hitting esc bypasses exit animation for anyone testing.
14
14
  */
15
- export function OpenTransition(props: any): JSX.Element;
15
+ export function OpenTransition(props: any): any;
16
16
  export let Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
17
17
  export let Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
18
18
  export let Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
@@ -1 +1 @@
1
- {"mappings":";;AAoBA;;;;;;;;;;;GAWG;AAEH,+BAA+B,KAAK,KAAA,eAMnC;ACwBD,OAAA,IAAI,uIAAoC,CAAC;AC0IzC,OAAA,IAAI,uIAA8B,CAAC;AE5FnC,OAAA,IAAI,mIAA0B,CAAC;AC2B/B,OAAA,IAAI,iIAAwB,CAAC","sources":["packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Modal.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Tray.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAoBA;;;;;;;;;;;GAWG;AAEH,+BAA+B,KAAK,KAAA,OAWnC;ACmBD,OAAA,IAAI,uIAAoC,CAAC;AC0IzC,OAAA,IAAI,uIAA8B,CAAC;AE5FnC,OAAA,IAAI,mIAA0B,CAAC;ACQ/B,OAAA,IAAI,iIAAwB,CAAC","sources":["packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/OpenTransition.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Overlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Popover.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Underlay.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Modal.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/Tray.tsx","packages/@react-spectrum/overlays/src/packages/@react-spectrum/overlays/src/index.ts","packages/@react-spectrum/overlays/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Overlay';\nexport * from './Popover';\nexport * from './Modal';\nexport * from './Tray';\nexport * from './OpenTransition';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/overlays",
3
- "version": "3.4.8",
3
+ "version": "3.6.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/overlays": "^3.8.1",
36
- "@react-aria/utils": "^3.11.3",
37
- "@react-spectrum/utils": "^3.6.7",
38
- "@react-stately/overlays": "^3.1.6",
39
- "@react-types/overlays": "^3.5.4",
40
- "@react-types/shared": "^3.11.2",
35
+ "@react-aria/overlays": "^3.9.1",
36
+ "@react-aria/utils": "^3.13.1",
37
+ "@react-spectrum/utils": "^3.7.1",
38
+ "@react-stately/overlays": "^3.3.1",
39
+ "@react-types/overlays": "^3.6.1",
40
+ "@react-types/shared": "^3.13.1",
41
41
  "react-transition-group": "^2.2.0"
42
42
  },
43
43
  "devDependencies": {
@@ -45,11 +45,11 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@react-spectrum/provider": "^3.0.0",
48
- "react": "^16.8.0 || ^17.0.0-rc.1",
49
- "react-dom": "^16.8.0 || ^17.0.0-rc.1"
48
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0",
49
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "e7708349a637642a30d33a11ca4a75ad5829eaa3"
54
+ "gitHead": "715c3f563ccf8c2e0102d3e18403d9db21a05a71"
55
55
  }
@@ -32,6 +32,11 @@ const OPEN_STATES = {
32
32
  */
33
33
 
34
34
  export function OpenTransition(props) {
35
+ // Do not apply any transition if in chromatic.
36
+ if (process.env.CHROMATIC) {
37
+ return React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: props.in}));
38
+ }
39
+
35
40
  return (
36
41
  <Transition timeout={{enter: 0, exit: 350}} {...props}>
37
42
  {(state) => React.Children.map(props.children, child => child && React.cloneElement(child, {isOpen: !!OPEN_STATES[state]}))}
package/src/Tray.tsx CHANGED
@@ -15,7 +15,7 @@ import {DOMRef} from '@react-types/shared';
15
15
  import {mergeProps, useViewportSize} from '@react-aria/utils';
16
16
  import {Overlay} from './Overlay';
17
17
  import overrideStyles from './overlays.css';
18
- import React, {forwardRef, HTMLAttributes, ReactNode, RefObject, useEffect, useRef, useState} from 'react';
18
+ import React, {forwardRef, HTMLAttributes, ReactNode, RefObject} from 'react';
19
19
  import {TrayProps} from '@react-types/overlays';
20
20
  import trayStyles from '@adobe/spectrum-css-temp/components/tray/vars.css';
21
21
  import {Underlay} from './Underlay';
@@ -75,27 +75,8 @@ let TrayWrapper = forwardRef(function (props: TrayWrapperProps, ref: RefObject<H
75
75
  // Also, the visual viewport is smaller than the layout viewport when the virtual keyboard
76
76
  // is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.
77
77
  let viewport = useViewportSize();
78
- let [height, setHeight] = useState(viewport.height);
79
- let timeoutRef = useRef<any>();
80
-
81
- useEffect(() => {
82
- clearTimeout(timeoutRef.current);
83
-
84
- // When the height is decreasing, and the keyboard is visible
85
- // (visual viewport smaller than layout viewport), delay setting
86
- // the new max height until after the animation is complete
87
- // so that there isn't an empty space under the tray briefly.
88
- if (viewport.height < height && viewport.height < window.innerHeight) {
89
- timeoutRef.current = setTimeout(() => {
90
- setHeight(viewport.height);
91
- }, 500);
92
- } else {
93
- setHeight(viewport.height);
94
- }
95
- }, [height, viewport.height]);
96
-
97
78
  let wrapperStyle: any = {
98
- '--spectrum-visual-viewport-height': height + 'px'
79
+ '--spectrum-visual-viewport-height': viewport.height + 'px'
99
80
  };
100
81
 
101
82
  let wrapperClassName = classNames(