@atlaskit/layer
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -1,6 +0,16 @@ | ||
<a name="2.1.2"></a> | ||
## 2.1.2 (2017-04-27) | ||
<a name="2.1.3"></a> | ||
## 2.1.3 (2017-05-02) | ||
<a name="2.1.3"></a> | ||
## 2.1.3 (2017-05-02) | ||
### Bug Fixes | ||
* **performance:** don't initialize Popper for empty layer ([67e34db](https://bitbucket.org/atlassian/atlaskit/commits/67e34db)) | ||
<a name="2.1.2"></a> | ||
@@ -7,0 +17,0 @@ ## 2.1.2 (2017-04-27) |
@@ -134,4 +134,7 @@ module.exports = /******/ | ||
value: function(props) { | ||
if (this.targetRef && this.contentRef) { | ||
this.popper && this.popper.destroy(); | ||
if (this.targetRef && this.contentRef && (this.popper && this.popper.destroy(), | ||
props.content)) // "new Popper(...)" operation is very expensive when called on virtual DOM. | ||
// This condition reduces the number of calls so we can run our tests faster | ||
// (time was reduced from 100s to 13s). | ||
{ | ||
// we wrap our target in a div so that we can safely get a reference to it, but we pass the | ||
@@ -138,0 +141,0 @@ // actual target to popper |
@@ -1,1 +0,1 @@ | ||
module.exports=function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),r=i(n),p=o(3),s=i(p),l=o(4),a=i(l),f=o(5),u=i(f),d=o(6),c=i(d),h=o(7),m=i(h),b=o(8),P=i(b),y=o(9),g=o(10),v=function(t){function e(t){(0,s.default)(this,e);var o=(0,u.default)(this,(e.__proto__||(0,r.default)(e)).call(this,t));return o.extractStyles=function(t){if(t){var e=Math.round(t.offsets.popper.left),i=Math.round(t.offsets.popper.top);o.setState({cssPosition:t.offsets.popper.position,transform:"translate3d("+e+"px, "+i+"px, 0px)",flipped:!!t.flipped,actualPosition:t.position,originalPosition:t.originalPosition})}},o.state={position:null,transform:null,flipped:!1,actualPosition:null,originalPosition:null},o}return(0,c.default)(e,t),(0,a.default)(e,[{key:"componentDidMount",value:function(){this.applyPopper(this.props)}},{key:"componentWillReceiveProps",value:function(t){this.applyPopper(t)}},{key:"componentDidUpdate",value:function(t,e){e.flipped!==this.state.flipped&&this.props.onFlippedChange({flipped:this.state.flipped,actualPosition:this.state.actualPosition,originalPosition:this.state.originalPosition})}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"applyPopper",value:function(t){if(this.targetRef&&this.contentRef){this.popper&&this.popper.destroy();var e=this.targetRef.firstChild,o={placement:(0,g.positionPropToPopperPosition)(t.position),onCreate:this.extractStyles,onUpdate:this.extractStyles,modifiers:{applyStyle:{enabled:!1},hide:{enabled:!1},offset:{enabled:!0,offset:this.props.offset},flip:{enabled:!!this.props.autoFlip,flipVariations:!0,boundariesElement:this.props.boundariesElement,padding:0},preventOverflow:{enabled:!!this.props.autoFlip,escapeWithReference:!0}}},i=(0,g.getFlipBehavior)(t);i&&(o.modifiers.flip.behavior=i),this.popper=new P.default(e,this.contentRef,o)}}},{key:"render",value:function(){var t=this,e=this.state,o=e.cssPosition,i=e.transform;return m.default.createElement("div",null,m.default.createElement("div",{ref:function(e){return t.targetRef=e}},this.props.children),m.default.createElement("div",{ref:function(e){return t.contentRef=e},style:{top:0,left:0,position:o,transform:i,zIndex:y.akZIndexLayer}},this.props.content))}}]),e}(h.PureComponent);v.propTypes={position:h.PropTypes.oneOf(g.POSITION_ATTRIBUTE_ENUM.values),autoFlip:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.arrayOf(h.PropTypes.oneOf(["top","right","bottom","left"]))]),boundariesElement:h.PropTypes.oneOf(["viewport","window","scrollParent"]),offset:h.PropTypes.string,content:h.PropTypes.node,onFlippedChange:h.PropTypes.func,children:h.PropTypes.node},v.defaultProps={position:g.POSITION_ATTRIBUTE_ENUM.default,boundariesElement:"viewport",autoFlip:!0,offset:"0 0",content:null,onFlippedChange:function(){},children:null},e.default=v},function(t,e){t.exports=require("babel-runtime/core-js/object/get-prototype-of")},function(t,e){t.exports=require("babel-runtime/helpers/classCallCheck")},function(t,e){t.exports=require("babel-runtime/helpers/createClass")},function(t,e){t.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(t,e){t.exports=require("babel-runtime/helpers/inherits")},function(t,e){t.exports=require("react")},function(t,e){t.exports=require("popper.js")},function(t,e){t.exports=require("@atlaskit/util-shared-styles")},function(t,e){"use strict";function o(t){return r[t]?r[t].position:null}function i(t){return Array.isArray(t.autoFlip)?[t.position.split(" ")[0]].concat(t.autoFlip):null}function n(t){return o(t)||r[p.default].position}Object.defineProperty(e,"__esModule",{value:!0});var r={"top left":{position:"top-start",animation:"top"},"top center":{position:"top",animation:"top"},"top right":{position:"top-end",animation:"top"},"right top":{position:"right-start",animation:"right"},"right middle":{position:"right",animation:"right"},"right bottom":{position:"right-end",animation:"right"},"bottom left":{position:"bottom-start",animation:"bottom"},"bottom center":{position:"bottom",animation:"bottom"},"bottom right":{position:"bottom-end",animation:"bottom"},"left top":{position:"left-start",animation:"left"},"left middle":{position:"left",animation:"left"},"left bottom":{position:"left-end",animation:"left"}},p={values:["top left","top center","top right","right top","right middle","right bottom","bottom left","bottom center","bottom right","left top","left middle","left bottom"],default:"right middle"};e.getFlipBehavior=i,e.positionPropToPopperPosition=n,e.POSITION_ATTRIBUTE_ENUM=p}]); | ||
module.exports=function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var n=o(2),r=i(n),p=o(3),s=i(p),l=o(4),a=i(l),f=o(5),u=i(f),d=o(6),c=i(d),h=o(7),m=i(h),b=o(8),P=i(b),y=o(9),g=o(10),v=function(t){function e(t){(0,s.default)(this,e);var o=(0,u.default)(this,(e.__proto__||(0,r.default)(e)).call(this,t));return o.extractStyles=function(t){if(t){var e=Math.round(t.offsets.popper.left),i=Math.round(t.offsets.popper.top);o.setState({cssPosition:t.offsets.popper.position,transform:"translate3d("+e+"px, "+i+"px, 0px)",flipped:!!t.flipped,actualPosition:t.position,originalPosition:t.originalPosition})}},o.state={position:null,transform:null,flipped:!1,actualPosition:null,originalPosition:null},o}return(0,c.default)(e,t),(0,a.default)(e,[{key:"componentDidMount",value:function(){this.applyPopper(this.props)}},{key:"componentWillReceiveProps",value:function(t){this.applyPopper(t)}},{key:"componentDidUpdate",value:function(t,e){e.flipped!==this.state.flipped&&this.props.onFlippedChange({flipped:this.state.flipped,actualPosition:this.state.actualPosition,originalPosition:this.state.originalPosition})}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"applyPopper",value:function(t){if(this.targetRef&&this.contentRef&&(this.popper&&this.popper.destroy(),t.content)){var e=this.targetRef.firstChild,o={placement:(0,g.positionPropToPopperPosition)(t.position),onCreate:this.extractStyles,onUpdate:this.extractStyles,modifiers:{applyStyle:{enabled:!1},hide:{enabled:!1},offset:{enabled:!0,offset:this.props.offset},flip:{enabled:!!this.props.autoFlip,flipVariations:!0,boundariesElement:this.props.boundariesElement,padding:0},preventOverflow:{enabled:!!this.props.autoFlip,escapeWithReference:!0}}},i=(0,g.getFlipBehavior)(t);i&&(o.modifiers.flip.behavior=i),this.popper=new P.default(e,this.contentRef,o)}}},{key:"render",value:function(){var t=this,e=this.state,o=e.cssPosition,i=e.transform;return m.default.createElement("div",null,m.default.createElement("div",{ref:function(e){return t.targetRef=e}},this.props.children),m.default.createElement("div",{ref:function(e){return t.contentRef=e},style:{top:0,left:0,position:o,transform:i,zIndex:y.akZIndexLayer}},this.props.content))}}]),e}(h.PureComponent);v.propTypes={position:h.PropTypes.oneOf(g.POSITION_ATTRIBUTE_ENUM.values),autoFlip:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.arrayOf(h.PropTypes.oneOf(["top","right","bottom","left"]))]),boundariesElement:h.PropTypes.oneOf(["viewport","window","scrollParent"]),offset:h.PropTypes.string,content:h.PropTypes.node,onFlippedChange:h.PropTypes.func,children:h.PropTypes.node},v.defaultProps={position:g.POSITION_ATTRIBUTE_ENUM.default,boundariesElement:"viewport",autoFlip:!0,offset:"0 0",content:null,onFlippedChange:function(){},children:null},e.default=v},function(t,e){t.exports=require("babel-runtime/core-js/object/get-prototype-of")},function(t,e){t.exports=require("babel-runtime/helpers/classCallCheck")},function(t,e){t.exports=require("babel-runtime/helpers/createClass")},function(t,e){t.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(t,e){t.exports=require("babel-runtime/helpers/inherits")},function(t,e){t.exports=require("react")},function(t,e){t.exports=require("popper.js")},function(t,e){t.exports=require("@atlaskit/util-shared-styles")},function(t,e){"use strict";function o(t){return r[t]?r[t].position:null}function i(t){return Array.isArray(t.autoFlip)?[t.position.split(" ")[0]].concat(t.autoFlip):null}function n(t){return o(t)||r[p.default].position}Object.defineProperty(e,"__esModule",{value:!0});var r={"top left":{position:"top-start",animation:"top"},"top center":{position:"top",animation:"top"},"top right":{position:"top-end",animation:"top"},"right top":{position:"right-start",animation:"right"},"right middle":{position:"right",animation:"right"},"right bottom":{position:"right-end",animation:"right"},"bottom left":{position:"bottom-start",animation:"bottom"},"bottom center":{position:"bottom",animation:"bottom"},"bottom right":{position:"bottom-end",animation:"bottom"},"left top":{position:"left-start",animation:"left"},"left middle":{position:"left",animation:"left"},"left bottom":{position:"left-end",animation:"left"}},p={values:["top left","top center","top right","right top","right middle","right bottom","bottom left","bottom center","bottom right","left top","left middle","left bottom"],default:"right middle"};e.getFlipBehavior=i,e.positionPropToPopperPosition=n,e.POSITION_ATTRIBUTE_ENUM=p}]); |
@@ -137,4 +137,7 @@ !function(root, factory) { | ||
value: function(props) { | ||
if (this.targetRef && this.contentRef) { | ||
this.popper && this.popper.destroy(); | ||
if (this.targetRef && this.contentRef && (this.popper && this.popper.destroy(), | ||
props.content)) // "new Popper(...)" operation is very expensive when called on virtual DOM. | ||
// This condition reduces the number of calls so we can run our tests faster | ||
// (time was reduced from 100s to 13s). | ||
{ | ||
// we wrap our target in a div so that we can safely get a reference to it, but we pass the | ||
@@ -141,0 +144,0 @@ // actual target to popper |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("popper.js"),require("@atlaskit/util-shared-styles")):"function"==typeof define&&define.amd?define(["babel-runtime/core-js/object/get-prototype-of","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","react","popper.js","@atlaskit/util-shared-styles"],e):"object"==typeof exports?exports["@atlaskit/layer"]=e(require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("popper.js"),require("@atlaskit/util-shared-styles")):t["@atlaskit/layer"]=e(t["babel-runtime/core-js/object/get-prototype-of"],t["babel-runtime/helpers/classCallCheck"],t["babel-runtime/helpers/createClass"],t["babel-runtime/helpers/possibleConstructorReturn"],t["babel-runtime/helpers/inherits"],t.react,t["popper.js"],t["@atlaskit/util-shared-styles"])}(this,function(t,e,o,i,r,n,p,s){return function(t){function e(i){if(o[i])return o[i].exports;var r=o[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=o(2),n=i(r),p=o(3),s=i(p),l=o(4),a=i(l),u=o(5),f=i(u),c=o(6),d=i(c),h=o(7),b=i(h),m=o(8),y=i(m),P=o(9),g=o(10),v=function(t){function e(t){(0,s.default)(this,e);var o=(0,f.default)(this,(e.__proto__||(0,n.default)(e)).call(this,t));return o.extractStyles=function(t){if(t){var e=Math.round(t.offsets.popper.left),i=Math.round(t.offsets.popper.top);o.setState({cssPosition:t.offsets.popper.position,transform:"translate3d("+e+"px, "+i+"px, 0px)",flipped:!!t.flipped,actualPosition:t.position,originalPosition:t.originalPosition})}},o.state={position:null,transform:null,flipped:!1,actualPosition:null,originalPosition:null},o}return(0,d.default)(e,t),(0,a.default)(e,[{key:"componentDidMount",value:function(){this.applyPopper(this.props)}},{key:"componentWillReceiveProps",value:function(t){this.applyPopper(t)}},{key:"componentDidUpdate",value:function(t,e){e.flipped!==this.state.flipped&&this.props.onFlippedChange({flipped:this.state.flipped,actualPosition:this.state.actualPosition,originalPosition:this.state.originalPosition})}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"applyPopper",value:function(t){if(this.targetRef&&this.contentRef){this.popper&&this.popper.destroy();var e=this.targetRef.firstChild,o={placement:(0,g.positionPropToPopperPosition)(t.position),onCreate:this.extractStyles,onUpdate:this.extractStyles,modifiers:{applyStyle:{enabled:!1},hide:{enabled:!1},offset:{enabled:!0,offset:this.props.offset},flip:{enabled:!!this.props.autoFlip,flipVariations:!0,boundariesElement:this.props.boundariesElement,padding:0},preventOverflow:{enabled:!!this.props.autoFlip,escapeWithReference:!0}}},i=(0,g.getFlipBehavior)(t);i&&(o.modifiers.flip.behavior=i),this.popper=new y.default(e,this.contentRef,o)}}},{key:"render",value:function(){var t=this,e=this.state,o=e.cssPosition,i=e.transform;return b.default.createElement("div",null,b.default.createElement("div",{ref:function(e){return t.targetRef=e}},this.props.children),b.default.createElement("div",{ref:function(e){return t.contentRef=e},style:{top:0,left:0,position:o,transform:i,zIndex:P.akZIndexLayer}},this.props.content))}}]),e}(h.PureComponent);v.propTypes={position:h.PropTypes.oneOf(g.POSITION_ATTRIBUTE_ENUM.values),autoFlip:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.arrayOf(h.PropTypes.oneOf(["top","right","bottom","left"]))]),boundariesElement:h.PropTypes.oneOf(["viewport","window","scrollParent"]),offset:h.PropTypes.string,content:h.PropTypes.node,onFlippedChange:h.PropTypes.func,children:h.PropTypes.node},v.defaultProps={position:g.POSITION_ATTRIBUTE_ENUM.default,boundariesElement:"viewport",autoFlip:!0,offset:"0 0",content:null,onFlippedChange:function(){},children:null},e.default=v},function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e){t.exports=r},function(t,e){t.exports=n},function(t,e){t.exports=p},function(t,e){t.exports=s},function(t,e){"use strict";function o(t){return n[t]?n[t].position:null}function i(t){return Array.isArray(t.autoFlip)?[t.position.split(" ")[0]].concat(t.autoFlip):null}function r(t){return o(t)||n[p.default].position}Object.defineProperty(e,"__esModule",{value:!0});var n={"top left":{position:"top-start",animation:"top"},"top center":{position:"top",animation:"top"},"top right":{position:"top-end",animation:"top"},"right top":{position:"right-start",animation:"right"},"right middle":{position:"right",animation:"right"},"right bottom":{position:"right-end",animation:"right"},"bottom left":{position:"bottom-start",animation:"bottom"},"bottom center":{position:"bottom",animation:"bottom"},"bottom right":{position:"bottom-end",animation:"bottom"},"left top":{position:"left-start",animation:"left"},"left middle":{position:"left",animation:"left"},"left bottom":{position:"left-end",animation:"left"}},p={values:["top left","top center","top right","right top","right middle","right bottom","bottom left","bottom center","bottom right","left top","left middle","left bottom"],default:"right middle"};e.getFlipBehavior=i,e.positionPropToPopperPosition=r,e.POSITION_ATTRIBUTE_ENUM=p}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("popper.js"),require("@atlaskit/util-shared-styles")):"function"==typeof define&&define.amd?define(["babel-runtime/core-js/object/get-prototype-of","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","react","popper.js","@atlaskit/util-shared-styles"],e):"object"==typeof exports?exports["@atlaskit/layer"]=e(require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("react"),require("popper.js"),require("@atlaskit/util-shared-styles")):t["@atlaskit/layer"]=e(t["babel-runtime/core-js/object/get-prototype-of"],t["babel-runtime/helpers/classCallCheck"],t["babel-runtime/helpers/createClass"],t["babel-runtime/helpers/possibleConstructorReturn"],t["babel-runtime/helpers/inherits"],t.react,t["popper.js"],t["@atlaskit/util-shared-styles"])}(this,function(t,e,o,i,r,n,p,s){return function(t){function e(i){if(o[i])return o[i].exports;var r=o[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=o(2),n=i(r),p=o(3),s=i(p),l=o(4),a=i(l),u=o(5),f=i(u),c=o(6),d=i(c),h=o(7),b=i(h),m=o(8),y=i(m),P=o(9),g=o(10),v=function(t){function e(t){(0,s.default)(this,e);var o=(0,f.default)(this,(e.__proto__||(0,n.default)(e)).call(this,t));return o.extractStyles=function(t){if(t){var e=Math.round(t.offsets.popper.left),i=Math.round(t.offsets.popper.top);o.setState({cssPosition:t.offsets.popper.position,transform:"translate3d("+e+"px, "+i+"px, 0px)",flipped:!!t.flipped,actualPosition:t.position,originalPosition:t.originalPosition})}},o.state={position:null,transform:null,flipped:!1,actualPosition:null,originalPosition:null},o}return(0,d.default)(e,t),(0,a.default)(e,[{key:"componentDidMount",value:function(){this.applyPopper(this.props)}},{key:"componentWillReceiveProps",value:function(t){this.applyPopper(t)}},{key:"componentDidUpdate",value:function(t,e){e.flipped!==this.state.flipped&&this.props.onFlippedChange({flipped:this.state.flipped,actualPosition:this.state.actualPosition,originalPosition:this.state.originalPosition})}},{key:"componentWillUnmount",value:function(){this.popper&&this.popper.destroy()}},{key:"applyPopper",value:function(t){if(this.targetRef&&this.contentRef&&(this.popper&&this.popper.destroy(),t.content)){var e=this.targetRef.firstChild,o={placement:(0,g.positionPropToPopperPosition)(t.position),onCreate:this.extractStyles,onUpdate:this.extractStyles,modifiers:{applyStyle:{enabled:!1},hide:{enabled:!1},offset:{enabled:!0,offset:this.props.offset},flip:{enabled:!!this.props.autoFlip,flipVariations:!0,boundariesElement:this.props.boundariesElement,padding:0},preventOverflow:{enabled:!!this.props.autoFlip,escapeWithReference:!0}}},i=(0,g.getFlipBehavior)(t);i&&(o.modifiers.flip.behavior=i),this.popper=new y.default(e,this.contentRef,o)}}},{key:"render",value:function(){var t=this,e=this.state,o=e.cssPosition,i=e.transform;return b.default.createElement("div",null,b.default.createElement("div",{ref:function(e){return t.targetRef=e}},this.props.children),b.default.createElement("div",{ref:function(e){return t.contentRef=e},style:{top:0,left:0,position:o,transform:i,zIndex:P.akZIndexLayer}},this.props.content))}}]),e}(h.PureComponent);v.propTypes={position:h.PropTypes.oneOf(g.POSITION_ATTRIBUTE_ENUM.values),autoFlip:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.arrayOf(h.PropTypes.oneOf(["top","right","bottom","left"]))]),boundariesElement:h.PropTypes.oneOf(["viewport","window","scrollParent"]),offset:h.PropTypes.string,content:h.PropTypes.node,onFlippedChange:h.PropTypes.func,children:h.PropTypes.node},v.defaultProps={position:g.POSITION_ATTRIBUTE_ENUM.default,boundariesElement:"viewport",autoFlip:!0,offset:"0 0",content:null,onFlippedChange:function(){},children:null},e.default=v},function(e,o){e.exports=t},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e){t.exports=i},function(t,e){t.exports=r},function(t,e){t.exports=n},function(t,e){t.exports=p},function(t,e){t.exports=s},function(t,e){"use strict";function o(t){return n[t]?n[t].position:null}function i(t){return Array.isArray(t.autoFlip)?[t.position.split(" ")[0]].concat(t.autoFlip):null}function r(t){return o(t)||n[p.default].position}Object.defineProperty(e,"__esModule",{value:!0});var n={"top left":{position:"top-start",animation:"top"},"top center":{position:"top",animation:"top"},"top right":{position:"top-end",animation:"top"},"right top":{position:"right-start",animation:"right"},"right middle":{position:"right",animation:"right"},"right bottom":{position:"right-end",animation:"right"},"bottom left":{position:"bottom-start",animation:"bottom"},"bottom center":{position:"bottom",animation:"bottom"},"bottom right":{position:"bottom-end",animation:"bottom"},"left top":{position:"left-start",animation:"left"},"left middle":{position:"left",animation:"left"},"left bottom":{position:"left-end",animation:"left"}},p={values:["top left","top center","top right","right top","right middle","right bottom","bottom left","bottom center","bottom right","left top","left middle","left bottom"],default:"right middle"};e.getFlipBehavior=i,e.positionPropToPopperPosition=r,e.POSITION_ATTRIBUTE_ENUM=p}])}); |
{ | ||
"name": "@atlaskit/layer", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"config": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -16,3 +16,3 @@ [](http://atlaskit.atlassian.com) | ||
Interact with a [live demo of the @atlaskit/layer component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/layer/2.1.2/). | ||
Interact with a [live demo of the @atlaskit/layer component](https://aui-cdn.atlassian.com/atlaskit/stories/@atlaskit/layer/2.1.3/). | ||
@@ -19,0 +19,0 @@ ## Installation |
50663
648