@react-spectrum/overlays 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +195 -114
- package/dist/main.js.map +1 -1
- package/dist/module.js +195 -114
- package/dist/module.js.map +1 -1
- package/package.json +8 -8
- package/src/OpenTransition.tsx +1 -1
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 var(--spectrum-popover-shadow-offset-y,var(--spectrum-alias-dropshadow-offset-y))var(--spectrum-popover-shadow-blur,var(--spectrum-alias-dropshadow-blur))var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));-webkit-filter:drop-shadow(0 var(--spectrum-popover-shadow-offset-y,var(--spectrum-alias-dropshadow-offset-y))var(--spectrum-popover-shadow-blur,var(--spectrum-alias-dropshadow-blur))var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));will-change:filter;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-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.spectrum-Underlay--transparent_eb7615{background:0 0;transition:none}.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-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-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)}
|
|
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-Tray_23bf66{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,.13s)ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s)ease-in-out,visibility 0s linear var(--spectrum-global-animation-duration-100,.13s);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(.5,0,1,1)0s,transform var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))cubic-bezier(.5,0,1,1)0s;outline:none;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,.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,.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)}.spectrum-Modal_f81956{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,.13s)ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s)ease-in-out,visibility 0s linear var(--spectrum-global-animation-duration-100,.13s);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 0s linear var(--spectrum-global-animation-duration-100,.13s);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)*.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(.5,0,1,1)0s,visibility 0s linear calc(0s + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100))),transform 0s linear calc(0s + var(--spectrum-dialog-exit-animation-duration,var(--spectrum-global-animation-duration-100)));outline:none}.spectrum-Modal_f81956.is-open_f81956{transition:transform var(--spectrum-dialog-entry-animation-duration,var(--spectrum-global-animation-duration-500))cubic-bezier(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,.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:none;border-radius: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,.13s)ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s)ease-in-out,visibility 0s linear var(--spectrum-global-animation-duration-100,.13s);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(.5,0,1,1)var(--spectrum-dialog-background-exit-animation-delay,var(--spectrum-global-animation-duration-200)),visibility 0s 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.spectrum-Underlay--transparent_eb7615{background:0 0;transition:none}.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,.4,1)0s}.spectrum-Underlay_eb7615{background:var(--spectrum-dialog-underlay-background-color,var(--spectrum-alias-background-color-modal-overlay))}.spectrum-Popover_6115b8{visibility:hidden;opacity:0;transition:transform var(--spectrum-global-animation-duration-100,.13s)ease-in-out,opacity var(--spectrum-global-animation-duration-100,.13s)ease-in-out,visibility 0s linear var(--spectrum-global-animation-duration-100,.13s);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:none;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 var(--spectrum-popover-shadow-offset-y,var(--spectrum-alias-dropshadow-offset-y))var(--spectrum-popover-shadow-blur,var(--spectrum-alias-dropshadow-blur))var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));-webkit-filter:drop-shadow(0 var(--spectrum-popover-shadow-offset-y,var(--spectrum-alias-dropshadow-offset-y))var(--spectrum-popover-shadow-blur,var(--spectrum-alias-dropshadow-blur))var(--spectrum-popover-shadow-color,var(--spectrum-alias-dropshadow-color)));will-change:filter;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))}
|
package/dist/main.js
CHANGED
|
@@ -2,7 +2,7 @@ require("./main.css");
|
|
|
2
2
|
var $eLPAa$reactspectrumprovider = require("@react-spectrum/provider");
|
|
3
3
|
var $eLPAa$react = require("react");
|
|
4
4
|
var $eLPAa$reactariaoverlays = require("@react-aria/overlays");
|
|
5
|
-
var $eLPAa$
|
|
5
|
+
var $eLPAa$reacttransitiongroup = require("react-transition-group");
|
|
6
6
|
var $eLPAa$reactspectrumutils = require("@react-spectrum/utils");
|
|
7
7
|
var $eLPAa$reactariautils = require("@react-aria/utils");
|
|
8
8
|
|
|
@@ -18,25 +18,54 @@ $parcel$export(module.exports, "Popover", () => $f02bba55a62f20dd$export$5b6b194
|
|
|
18
18
|
$parcel$export(module.exports, "Modal", () => $fc75a6aa7a2b905b$export$2b77a92f1a5ad772);
|
|
19
19
|
$parcel$export(module.exports, "Tray", () => $6b386deda21be662$export$4589ed81930b555c);
|
|
20
20
|
$parcel$export(module.exports, "OpenTransition", () => $13f51cdc44d228b9$export$b847a40ee92eff38);
|
|
21
|
-
|
|
21
|
+
/*
|
|
22
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
23
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
24
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
25
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
28
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
29
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
30
|
+
* governing permissions and limitations under the License.
|
|
31
|
+
*/ /// <reference types="css-module-types" />
|
|
32
|
+
/*
|
|
33
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
34
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
35
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
36
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
37
|
+
*
|
|
38
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
39
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
40
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
41
|
+
* governing permissions and limitations under the License.
|
|
42
|
+
*/ /*
|
|
43
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
44
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
45
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
46
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
47
|
+
*
|
|
48
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
49
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
50
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
51
|
+
* governing permissions and limitations under the License.
|
|
52
|
+
*/
|
|
22
53
|
|
|
23
54
|
const $13f51cdc44d228b9$var$OPEN_STATES = {
|
|
24
55
|
entering: false,
|
|
25
56
|
entered: true
|
|
26
57
|
};
|
|
27
58
|
function $13f51cdc44d228b9$export$b847a40ee92eff38(props) {
|
|
28
|
-
var
|
|
29
|
-
return
|
|
59
|
+
var child;
|
|
60
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reacttransitiongroup.Transition), {
|
|
30
61
|
timeout: {
|
|
31
62
|
enter: 0,
|
|
32
63
|
exit: 350
|
|
33
64
|
},
|
|
34
65
|
...props
|
|
35
|
-
}, (state)=>($parcel$interopDefault($eLPAa$react)).Children.map(props.children, (child)=>child && /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).cloneElement(child, {
|
|
66
|
+
}, (state)=>(0, ($parcel$interopDefault($eLPAa$react))).Children.map(props.children, (child)=>child && /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).cloneElement(child, {
|
|
36
67
|
isOpen: !!$13f51cdc44d228b9$var$OPEN_STATES[state]
|
|
37
|
-
})
|
|
38
|
-
)
|
|
39
|
-
));
|
|
68
|
+
})));
|
|
40
69
|
}
|
|
41
70
|
|
|
42
71
|
|
|
@@ -45,14 +74,14 @@ function $13f51cdc44d228b9$export$b847a40ee92eff38(props) {
|
|
|
45
74
|
|
|
46
75
|
function $2aebdc186fd41e87$var$Overlay(props, ref) {
|
|
47
76
|
let { children: children , isOpen: isOpen , container: container , onEnter: onEnter , onEntering: onEntering , onEntered: onEntered , onExit: onExit , onExiting: onExiting , onExited: onExited } = props;
|
|
48
|
-
let [exited, setExited] = $eLPAa$react.useState(!isOpen);
|
|
49
|
-
let handleEntered = $eLPAa$react.useCallback(()=>{
|
|
77
|
+
let [exited, setExited] = (0, $eLPAa$react.useState)(!isOpen);
|
|
78
|
+
let handleEntered = (0, $eLPAa$react.useCallback)(()=>{
|
|
50
79
|
setExited(false);
|
|
51
80
|
if (onEntered) onEntered();
|
|
52
81
|
}, [
|
|
53
82
|
onEntered
|
|
54
83
|
]);
|
|
55
|
-
let handleExited = $eLPAa$react.useCallback(()=>{
|
|
84
|
+
let handleExited = (0, $eLPAa$react.useCallback)(()=>{
|
|
56
85
|
setExited(true);
|
|
57
86
|
if (onExited) onExited();
|
|
58
87
|
}, [
|
|
@@ -62,16 +91,16 @@ function $2aebdc186fd41e87$var$Overlay(props, ref) {
|
|
|
62
91
|
let mountOverlay = isOpen || !exited;
|
|
63
92
|
if (!mountOverlay) // Don't bother showing anything if we don't have to.
|
|
64
93
|
return null;
|
|
65
|
-
return
|
|
94
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactariaoverlays.Overlay), {
|
|
66
95
|
portalContainer: container
|
|
67
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($eLPAa$reactspectrumprovider.Provider, {
|
|
96
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactspectrumprovider.Provider), {
|
|
68
97
|
ref: ref,
|
|
69
98
|
UNSAFE_style: {
|
|
70
|
-
background:
|
|
71
|
-
isolation:
|
|
99
|
+
background: "transparent",
|
|
100
|
+
isolation: "isolate"
|
|
72
101
|
},
|
|
73
102
|
isDisabled: false
|
|
74
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($13f51cdc44d228b9$export$b847a40ee92eff38, {
|
|
103
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $13f51cdc44d228b9$export$b847a40ee92eff38), {
|
|
75
104
|
in: isOpen,
|
|
76
105
|
appear: true,
|
|
77
106
|
onExit: onExit,
|
|
@@ -80,12 +109,22 @@ function $2aebdc186fd41e87$var$Overlay(props, ref) {
|
|
|
80
109
|
onEnter: onEnter,
|
|
81
110
|
onEntering: onEntering,
|
|
82
111
|
onEntered: handleEntered
|
|
83
|
-
}, children)))
|
|
112
|
+
}, children)));
|
|
84
113
|
}
|
|
85
|
-
let $2aebdc186fd41e87$export$c6fdb837b070b4ff = /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).forwardRef($2aebdc186fd41e87$var$Overlay);
|
|
86
|
-
|
|
114
|
+
let $2aebdc186fd41e87$export$c6fdb837b070b4ff = /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).forwardRef($2aebdc186fd41e87$var$Overlay);
|
|
87
115
|
|
|
88
116
|
|
|
117
|
+
/*
|
|
118
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
119
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
120
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
121
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
122
|
+
*
|
|
123
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
124
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
125
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
126
|
+
* governing permissions and limitations under the License.
|
|
127
|
+
*/
|
|
89
128
|
|
|
90
129
|
|
|
91
130
|
var $e9a663ccb19ed1b0$exports = {};
|
|
@@ -154,7 +193,17 @@ $16e1dca4664d0b1c$export$cf634262e726cd19 = "spectrum-Popover--dialog_6115b8";
|
|
|
154
193
|
$16e1dca4664d0b1c$export$d8b16c5377728262 = "spectrum-Popover--withTip_6115b8";
|
|
155
194
|
|
|
156
195
|
|
|
157
|
-
|
|
196
|
+
/*
|
|
197
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
198
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
199
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
200
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
201
|
+
*
|
|
202
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
203
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
204
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
205
|
+
* governing permissions and limitations under the License.
|
|
206
|
+
*/
|
|
158
207
|
|
|
159
208
|
var $42908e91b4c5f428$exports = {};
|
|
160
209
|
|
|
@@ -170,12 +219,12 @@ $42908e91b4c5f428$export$8eb3860104039b44 = "spectrum-Underlay--transparent_eb76
|
|
|
170
219
|
|
|
171
220
|
|
|
172
221
|
function $b900e75089bdd9cd$export$f360afc887607b02({ isOpen: isOpen , isTransparent: isTransparent }) {
|
|
173
|
-
return
|
|
174
|
-
className: $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($42908e91b4c5f428$exports)),
|
|
175
|
-
|
|
176
|
-
|
|
222
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
223
|
+
className: (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($42908e91b4c5f428$exports))), "spectrum-Underlay", {
|
|
224
|
+
"is-open": isOpen,
|
|
225
|
+
"spectrum-Underlay--transparent": isTransparent
|
|
177
226
|
})
|
|
178
|
-
})
|
|
227
|
+
});
|
|
179
228
|
}
|
|
180
229
|
|
|
181
230
|
|
|
@@ -187,35 +236,35 @@ function $b900e75089bdd9cd$export$f360afc887607b02({ isOpen: isOpen , isTranspar
|
|
|
187
236
|
* the path always starts at 0 so that it perfectly overlaps the popover's border.
|
|
188
237
|
* See bottom of file for more explanation.
|
|
189
238
|
*/ let $f02bba55a62f20dd$var$arrowPlacement = {
|
|
190
|
-
left:
|
|
191
|
-
right:
|
|
192
|
-
top:
|
|
193
|
-
bottom:
|
|
239
|
+
left: "right",
|
|
240
|
+
right: "right",
|
|
241
|
+
top: "bottom",
|
|
242
|
+
bottom: "bottom"
|
|
194
243
|
};
|
|
195
244
|
function $f02bba55a62f20dd$var$Popover(props, ref) {
|
|
196
245
|
let { children: children , state: state , ...otherProps } = props;
|
|
197
|
-
let domRef = $eLPAa$reactspectrumutils.useDOMRef(ref);
|
|
198
|
-
return
|
|
246
|
+
let domRef = (0, $eLPAa$reactspectrumutils.useDOMRef)(ref);
|
|
247
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $2aebdc186fd41e87$export$c6fdb837b070b4ff), {
|
|
199
248
|
...otherProps,
|
|
200
249
|
isOpen: state.isOpen
|
|
201
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($f02bba55a62f20dd$var$PopoverWrapper, {
|
|
250
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement($f02bba55a62f20dd$var$PopoverWrapper, {
|
|
202
251
|
ref: domRef,
|
|
203
252
|
...props
|
|
204
|
-
}, children))
|
|
253
|
+
}, children));
|
|
205
254
|
}
|
|
206
|
-
const $f02bba55a62f20dd$var$PopoverWrapper = /*#__PURE__*/ $eLPAa$react.forwardRef((props, ref)=>{
|
|
255
|
+
const $f02bba55a62f20dd$var$PopoverWrapper = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)((props, ref)=>{
|
|
207
256
|
let { children: children , isOpen: isOpen , hideArrow: hideArrow , isNonModal: isNonModal , state: state } = props;
|
|
208
|
-
let { styleProps: styleProps } = $eLPAa$reactspectrumutils.useStyleProps(props);
|
|
209
|
-
let { popoverProps: popoverProps , arrowProps: arrowProps , underlayProps: underlayProps , placement: placement } = $eLPAa$reactariaoverlays.usePopover({
|
|
257
|
+
let { styleProps: styleProps } = (0, $eLPAa$reactspectrumutils.useStyleProps)(props);
|
|
258
|
+
let { popoverProps: popoverProps , arrowProps: arrowProps , underlayProps: underlayProps , placement: placement } = (0, $eLPAa$reactariaoverlays.usePopover)({
|
|
210
259
|
...props,
|
|
211
260
|
popoverRef: ref,
|
|
212
261
|
maxHeight: null
|
|
213
262
|
}, state);
|
|
214
|
-
return
|
|
263
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, ($parcel$interopDefault($eLPAa$react))).Fragment, null, !isNonModal && /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $b900e75089bdd9cd$export$f360afc887607b02), {
|
|
215
264
|
isTransparent: true,
|
|
216
265
|
...underlayProps,
|
|
217
266
|
isOpen: isOpen
|
|
218
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("div", {
|
|
267
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
219
268
|
...styleProps,
|
|
220
269
|
...popoverProps,
|
|
221
270
|
style: {
|
|
@@ -223,39 +272,39 @@ const $f02bba55a62f20dd$var$PopoverWrapper = /*#__PURE__*/ $eLPAa$react.forwardR
|
|
|
223
272
|
...popoverProps.style
|
|
224
273
|
},
|
|
225
274
|
ref: ref,
|
|
226
|
-
className: $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports)),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}, $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports)),
|
|
275
|
+
className: (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports))), "spectrum-Popover", `spectrum-Popover--${placement}`, {
|
|
276
|
+
"spectrum-Popover--withTip": !hideArrow,
|
|
277
|
+
"is-open": isOpen
|
|
278
|
+
}, (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports))), "spectrum-Popover", "react-spectrum-Popover"), styleProps.className),
|
|
230
279
|
role: "presentation",
|
|
231
280
|
"data-testid": "popover"
|
|
232
|
-
}, !isNonModal && /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($eLPAa$reactariaoverlays.DismissButton, {
|
|
281
|
+
}, !isNonModal && /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactariaoverlays.DismissButton), {
|
|
233
282
|
onDismiss: state.close
|
|
234
|
-
}), children, hideArrow ? null : /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($f02bba55a62f20dd$var$Arrow, {
|
|
283
|
+
}), children, hideArrow ? null : /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement($f02bba55a62f20dd$var$Arrow, {
|
|
235
284
|
arrowProps: arrowProps,
|
|
236
285
|
direction: $f02bba55a62f20dd$var$arrowPlacement[placement]
|
|
237
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($eLPAa$reactariaoverlays.DismissButton, {
|
|
286
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactariaoverlays.DismissButton), {
|
|
238
287
|
onDismiss: state.close
|
|
239
|
-
})))
|
|
288
|
+
})));
|
|
240
289
|
});
|
|
241
290
|
let $f02bba55a62f20dd$var$ROOT_2 = Math.sqrt(2);
|
|
242
291
|
function $f02bba55a62f20dd$var$Arrow(props) {
|
|
243
|
-
let [size, setSize] = $eLPAa$react.useState(20);
|
|
244
|
-
let [borderWidth, setBorderWidth] = $eLPAa$react.useState(1);
|
|
245
|
-
let ref = $eLPAa$react.useRef();
|
|
292
|
+
let [size, setSize] = (0, $eLPAa$react.useState)(20);
|
|
293
|
+
let [borderWidth, setBorderWidth] = (0, $eLPAa$react.useState)(1);
|
|
294
|
+
let ref = (0, $eLPAa$react.useRef)();
|
|
246
295
|
// get the css value for the tip size and divide it by 2 for this arrow implementation
|
|
247
|
-
$eLPAa$reactariautils.useLayoutEffect(()=>{
|
|
296
|
+
(0, $eLPAa$reactariautils.useLayoutEffect)(()=>{
|
|
248
297
|
if (ref.current) {
|
|
249
|
-
let spectrumTipWidth = window.getComputedStyle(ref.current).getPropertyValue(
|
|
250
|
-
if (spectrumTipWidth !==
|
|
251
|
-
let spectrumBorderWidth = window.getComputedStyle(ref.current).getPropertyValue(
|
|
252
|
-
if (spectrumBorderWidth !==
|
|
298
|
+
let spectrumTipWidth = window.getComputedStyle(ref.current).getPropertyValue("--spectrum-popover-tip-size");
|
|
299
|
+
if (spectrumTipWidth !== "") setSize(parseInt(spectrumTipWidth, 10) / 2);
|
|
300
|
+
let spectrumBorderWidth = window.getComputedStyle(ref.current).getPropertyValue("--spectrum-popover-tip-borderWidth");
|
|
301
|
+
if (spectrumBorderWidth !== "") setBorderWidth(parseInt(spectrumBorderWidth, 10));
|
|
253
302
|
}
|
|
254
303
|
}, [
|
|
255
304
|
ref
|
|
256
305
|
]);
|
|
257
|
-
let landscape = props.direction ===
|
|
258
|
-
let mirror = props.direction ===
|
|
306
|
+
let landscape = props.direction === "top" || props.direction === "bottom";
|
|
307
|
+
let mirror = props.direction === "left" || props.direction === "top";
|
|
259
308
|
let borderDiagonal = borderWidth * $f02bba55a62f20dd$var$ROOT_2;
|
|
260
309
|
let halfBorderDiagonal = borderDiagonal / 2;
|
|
261
310
|
let secondary = 2 * size + 2 * borderDiagonal;
|
|
@@ -266,44 +315,66 @@ function $f02bba55a62f20dd$var$Arrow(props) {
|
|
|
266
315
|
let secondaryMiddle = secondary / 2;
|
|
267
316
|
let secondaryEnd = secondary - halfBorderDiagonal;
|
|
268
317
|
let pathData = landscape ? [
|
|
269
|
-
|
|
318
|
+
"M",
|
|
270
319
|
secondaryStart,
|
|
271
320
|
primaryStart,
|
|
272
|
-
|
|
321
|
+
"L",
|
|
273
322
|
secondaryMiddle,
|
|
274
323
|
primaryEnd,
|
|
275
|
-
|
|
324
|
+
"L",
|
|
276
325
|
secondaryEnd,
|
|
277
326
|
primaryStart
|
|
278
327
|
] : [
|
|
279
|
-
|
|
328
|
+
"M",
|
|
280
329
|
primaryStart,
|
|
281
330
|
secondaryStart,
|
|
282
|
-
|
|
331
|
+
"L",
|
|
283
332
|
primaryEnd,
|
|
284
333
|
secondaryMiddle,
|
|
285
|
-
|
|
334
|
+
"L",
|
|
286
335
|
primaryStart,
|
|
287
336
|
secondaryEnd
|
|
288
337
|
];
|
|
289
338
|
let arrowProps = props.arrowProps;
|
|
290
|
-
/* use ceil because the svg needs to always accomodate the path inside it */ return
|
|
339
|
+
/* use ceil because the svg needs to always accomodate the path inside it */ return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("svg", {
|
|
291
340
|
xmlns: "http://www.w3.org/svg/2000",
|
|
292
341
|
width: Math.ceil(landscape ? secondary : primary),
|
|
293
342
|
height: Math.ceil(landscape ? primary : secondary),
|
|
294
343
|
style: props.style,
|
|
295
|
-
className: $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports)),
|
|
344
|
+
className: (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports))), "spectrum-Popover-tip"),
|
|
296
345
|
ref: ref,
|
|
297
346
|
...arrowProps
|
|
298
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("path", {
|
|
299
|
-
className: $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports)),
|
|
300
|
-
d: pathData.join(
|
|
301
|
-
}))
|
|
347
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("path", {
|
|
348
|
+
className: (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($16e1dca4664d0b1c$exports))), "spectrum-Popover-tip-triangle"),
|
|
349
|
+
d: pathData.join(" ")
|
|
350
|
+
}));
|
|
302
351
|
}
|
|
303
|
-
let $f02bba55a62f20dd$export$5b6b19405a83ff9d = /*#__PURE__*/ $eLPAa$react.forwardRef($f02bba55a62f20dd$var$Popover);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
352
|
+
let $f02bba55a62f20dd$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)($f02bba55a62f20dd$var$Popover);
|
|
353
|
+
/**
|
|
354
|
+
* More explanation on popover tips.
|
|
355
|
+
* - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid.
|
|
356
|
+
* This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom.
|
|
357
|
+
* - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border.
|
|
358
|
+
* This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border.
|
|
359
|
+
* - I tried getting the client bounding box and setting the svg to that partial pixel value
|
|
360
|
+
* This didn't work because again the issue was inside the svg
|
|
361
|
+
* - I didn't try drawing the svg backwards
|
|
362
|
+
* This could still be tried
|
|
363
|
+
* - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded
|
|
364
|
+
* This seems to have done the trick.
|
|
365
|
+
*/
|
|
366
|
+
|
|
367
|
+
/*
|
|
368
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
369
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
370
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
371
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
372
|
+
*
|
|
373
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
374
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
375
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
376
|
+
* governing permissions and limitations under the License.
|
|
377
|
+
*/
|
|
307
378
|
|
|
308
379
|
var $86571b803f942ff3$exports = {};
|
|
309
380
|
|
|
@@ -334,52 +405,62 @@ $86571b803f942ff3$export$175dd699720b5fb7 = "spectrum-Modal--fullscreenTakeover_
|
|
|
334
405
|
|
|
335
406
|
function $fc75a6aa7a2b905b$var$Modal(props, ref) {
|
|
336
407
|
let { children: children , state: state , ...otherProps } = props;
|
|
337
|
-
let domRef = $eLPAa$reactspectrumutils.useDOMRef(ref);
|
|
338
|
-
return
|
|
408
|
+
let domRef = (0, $eLPAa$reactspectrumutils.useDOMRef)(ref);
|
|
409
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $2aebdc186fd41e87$export$c6fdb837b070b4ff), {
|
|
339
410
|
...otherProps,
|
|
340
411
|
isOpen: state.isOpen
|
|
341
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($fc75a6aa7a2b905b$var$ModalWrapper, {
|
|
412
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement($fc75a6aa7a2b905b$var$ModalWrapper, {
|
|
342
413
|
...props,
|
|
343
414
|
ref: domRef
|
|
344
|
-
}, children))
|
|
415
|
+
}, children));
|
|
345
416
|
}
|
|
346
417
|
let $fc75a6aa7a2b905b$var$typeMap = {
|
|
347
|
-
fullscreen:
|
|
348
|
-
fullscreenTakeover:
|
|
418
|
+
fullscreen: "fullscreen",
|
|
419
|
+
fullscreenTakeover: "fullscreenTakeover"
|
|
349
420
|
};
|
|
350
|
-
let $fc75a6aa7a2b905b$var$ModalWrapper = /*#__PURE__*/ $eLPAa$react.forwardRef(function(props, ref) {
|
|
421
|
+
let $fc75a6aa7a2b905b$var$ModalWrapper = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)(function(props, ref) {
|
|
351
422
|
let { type: type , children: children , state: state , isOpen: isOpen } = props;
|
|
352
423
|
let typeVariant = $fc75a6aa7a2b905b$var$typeMap[type];
|
|
353
|
-
let { styleProps: styleProps } = $eLPAa$reactspectrumutils.useStyleProps(props);
|
|
354
|
-
let { modalProps: modalProps , underlayProps: underlayProps } = $eLPAa$reactariaoverlays.useModalOverlay(props, state, ref);
|
|
355
|
-
let wrapperClassName = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($86571b803f942ff3$exports)),
|
|
356
|
-
let modalClassName = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($86571b803f942ff3$exports)),
|
|
357
|
-
|
|
358
|
-
}, $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports)),
|
|
424
|
+
let { styleProps: styleProps } = (0, $eLPAa$reactspectrumutils.useStyleProps)(props);
|
|
425
|
+
let { modalProps: modalProps , underlayProps: underlayProps } = (0, $eLPAa$reactariaoverlays.useModalOverlay)(props, state, ref);
|
|
426
|
+
let wrapperClassName = (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($86571b803f942ff3$exports))), "spectrum-Modal-wrapper", (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports))), "spectrum-Modal-wrapper", "react-spectrum-Modal-wrapper"));
|
|
427
|
+
let modalClassName = (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($86571b803f942ff3$exports))), "spectrum-Modal", {
|
|
428
|
+
"is-open": isOpen
|
|
429
|
+
}, (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports))), "spectrum-Modal", "react-spectrum-Modal"), {
|
|
359
430
|
[`spectrum-Modal--${typeVariant}`]: typeVariant
|
|
360
431
|
}, styleProps.className);
|
|
361
|
-
let viewport = $eLPAa$reactariautils.useViewportSize();
|
|
432
|
+
let viewport = (0, $eLPAa$reactariautils.useViewportSize)();
|
|
362
433
|
let style = {
|
|
363
|
-
|
|
434
|
+
"--spectrum-visual-viewport-height": viewport.height + "px"
|
|
364
435
|
};
|
|
365
|
-
return
|
|
436
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, ($parcel$interopDefault($eLPAa$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $b900e75089bdd9cd$export$f360afc887607b02), {
|
|
366
437
|
...underlayProps,
|
|
367
438
|
isOpen: isOpen
|
|
368
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("div", {
|
|
439
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
369
440
|
className: wrapperClassName,
|
|
370
441
|
style: style
|
|
371
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("div", {
|
|
442
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
372
443
|
...styleProps,
|
|
373
444
|
...modalProps,
|
|
374
445
|
ref: ref,
|
|
375
446
|
className: modalClassName,
|
|
376
447
|
"data-testid": "modal"
|
|
377
|
-
}, children)))
|
|
448
|
+
}, children)));
|
|
378
449
|
});
|
|
379
|
-
let $fc75a6aa7a2b905b$export$2b77a92f1a5ad772 = /*#__PURE__*/ $eLPAa$react.forwardRef($fc75a6aa7a2b905b$var$Modal);
|
|
380
|
-
|
|
450
|
+
let $fc75a6aa7a2b905b$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)($fc75a6aa7a2b905b$var$Modal);
|
|
381
451
|
|
|
382
452
|
|
|
453
|
+
/*
|
|
454
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
455
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
456
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
457
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
458
|
+
*
|
|
459
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
460
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
461
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
462
|
+
* governing permissions and limitations under the License.
|
|
463
|
+
*/
|
|
383
464
|
|
|
384
465
|
|
|
385
466
|
|
|
@@ -404,19 +485,19 @@ $3ba16c5c57f2a636$export$79bfb05e59a300b = "spectrum-Tray--fixedHeight_23bf66";
|
|
|
404
485
|
|
|
405
486
|
function $6b386deda21be662$var$Tray(props, ref) {
|
|
406
487
|
let { children: children , state: state , ...otherProps } = props;
|
|
407
|
-
let domRef = $eLPAa$reactspectrumutils.useDOMRef(ref);
|
|
408
|
-
return
|
|
488
|
+
let domRef = (0, $eLPAa$reactspectrumutils.useDOMRef)(ref);
|
|
489
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $2aebdc186fd41e87$export$c6fdb837b070b4ff), {
|
|
409
490
|
...otherProps,
|
|
410
491
|
isOpen: state.isOpen
|
|
411
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($6b386deda21be662$var$TrayWrapper, {
|
|
492
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement($6b386deda21be662$var$TrayWrapper, {
|
|
412
493
|
...props,
|
|
413
494
|
ref: domRef
|
|
414
|
-
}, children))
|
|
495
|
+
}, children));
|
|
415
496
|
}
|
|
416
|
-
let $6b386deda21be662$var$TrayWrapper = /*#__PURE__*/ $eLPAa$react.forwardRef(function(props, ref) {
|
|
497
|
+
let $6b386deda21be662$var$TrayWrapper = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)(function(props, ref) {
|
|
417
498
|
let { children: children , isOpen: isOpen , isFixedHeight: isFixedHeight , state: state } = props;
|
|
418
|
-
let { styleProps: styleProps } = $eLPAa$reactspectrumutils.useStyleProps(props);
|
|
419
|
-
let { modalProps: modalProps , underlayProps: underlayProps } = $eLPAa$reactariaoverlays.useModalOverlay({
|
|
499
|
+
let { styleProps: styleProps } = (0, $eLPAa$reactspectrumutils.useStyleProps)(props);
|
|
500
|
+
let { modalProps: modalProps , underlayProps: underlayProps } = (0, $eLPAa$reactariaoverlays.useModalOverlay)({
|
|
420
501
|
...props,
|
|
421
502
|
isDismissable: true
|
|
422
503
|
}, state, ref);
|
|
@@ -427,34 +508,34 @@ let $6b386deda21be662$var$TrayWrapper = /*#__PURE__*/ $eLPAa$react.forwardRef(fu
|
|
|
427
508
|
// when the address bar/bottom toolbars show and hide on scroll and vh units are fixed.
|
|
428
509
|
// Also, the visual viewport is smaller than the layout viewport when the virtual keyboard
|
|
429
510
|
// is up, so use the VisualViewport API to ensure the tray is displayed above the keyboard.
|
|
430
|
-
let viewport = $eLPAa$reactariautils.useViewportSize();
|
|
511
|
+
let viewport = (0, $eLPAa$reactariautils.useViewportSize)();
|
|
431
512
|
let wrapperStyle = {
|
|
432
|
-
|
|
513
|
+
"--spectrum-visual-viewport-height": viewport.height + "px"
|
|
433
514
|
};
|
|
434
|
-
let wrapperClassName = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports)),
|
|
435
|
-
let className = $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports)),
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}, $eLPAa$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports)),
|
|
439
|
-
return
|
|
515
|
+
let wrapperClassName = (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports))), "spectrum-Tray-wrapper");
|
|
516
|
+
let className = (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3ba16c5c57f2a636$exports))), "spectrum-Tray", {
|
|
517
|
+
"is-open": isOpen,
|
|
518
|
+
"spectrum-Tray--fixedHeight": isFixedHeight
|
|
519
|
+
}, (0, $eLPAa$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($e9a663ccb19ed1b0$exports))), "spectrum-Tray", "react-spectrum-Tray"), styleProps.className);
|
|
520
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, ($parcel$interopDefault($eLPAa$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $b900e75089bdd9cd$export$f360afc887607b02), {
|
|
440
521
|
...underlayProps,
|
|
441
522
|
isOpen: isOpen
|
|
442
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("div", {
|
|
523
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
443
524
|
className: wrapperClassName,
|
|
444
525
|
style: wrapperStyle
|
|
445
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement("div", {
|
|
526
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement("div", {
|
|
446
527
|
...styleProps,
|
|
447
528
|
...modalProps,
|
|
448
529
|
className: className,
|
|
449
530
|
ref: ref,
|
|
450
531
|
"data-testid": "tray"
|
|
451
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($eLPAa$reactariaoverlays.DismissButton, {
|
|
532
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactariaoverlays.DismissButton), {
|
|
452
533
|
onDismiss: state.close
|
|
453
|
-
}), children, /*#__PURE__*/ ($parcel$interopDefault($eLPAa$react)).createElement($eLPAa$reactariaoverlays.DismissButton, {
|
|
534
|
+
}), children, /*#__PURE__*/ (0, ($parcel$interopDefault($eLPAa$react))).createElement((0, $eLPAa$reactariaoverlays.DismissButton), {
|
|
454
535
|
onDismiss: state.close
|
|
455
|
-
}))))
|
|
536
|
+
}))));
|
|
456
537
|
});
|
|
457
|
-
let $6b386deda21be662$export$4589ed81930b555c = /*#__PURE__*/ $eLPAa$react.forwardRef($6b386deda21be662$var$Tray);
|
|
538
|
+
let $6b386deda21be662$export$4589ed81930b555c = /*#__PURE__*/ (0, $eLPAa$react.forwardRef)($6b386deda21be662$var$Tray);
|
|
458
539
|
|
|
459
540
|
|
|
460
541
|
|