Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-layer

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-layer - npm Package Compare versions

Comparing version 56.4.1 to 57.0.0

111

CHANGELOG.md

@@ -1,8 +0,8 @@

<a name="56.4.0"></a>
# 56.4.0 (2016-08-04)
<a name="56.4.1"></a>
## 56.4.1 (2016-08-24)
<a name="ak-layer@56.4.0"></a>
# ak-layer@56.4.0 (2016-07-26)
<a name="ak-layer@56.4.1"></a>
## ak-layer@56.4.1 (2016-08-05)

@@ -12,5 +12,10 @@

* **linkButton:** component and color ([824c5d4](https://bitbucket.org/atlassian/atlaskit/commits/824c5d4))
* **package:** Fix package dependencies on github packages that were removed ([1c1a99e](https://bitbucket.org/atlassian/atlaskit/commits/1c1a99e))
<a name="ak-layer@56.4.0"></a>
# ak-layer@56.4.0 (2016-07-26)
### Features

@@ -32,2 +37,17 @@

<a name="ak-layer@56.1.2"></a>
## ak-layer@56.1.2 (2016-07-18)
### Bug Fixes
* **skate:** SkateJS update to beta.10 ([620034a](https://bitbucket.org/atlassian/atlaskit/commits/620034a))
### Features
* change 'open' property to boolean for the inline-dialog ([3bd196d](https://bitbucket.org/atlassian/atlaskit/commits/3bd196d))
<a name="ak-layer@56.1.1"></a>

@@ -37,2 +57,83 @@ ## ak-layer@56.1.1 (2016-07-14)

### Bug Fixes
* export WC definition by default from register ([43df4e4](https://bitbucket.org/atlassian/atlaskit/commits/43df4e4))
<a name="ak-layer@56.1.0"></a>
# ak-layer@56.1.0 (2016-07-12)
### Bug Fixes
* **akutil-shared-styles:** Depend on correct version of the shared styles ([fb64e0e](https://bitbucket.org/atlassian/atlaskit/commits/fb64e0e))
* **share styles:** use * until we are published ([a2792e5](https://bitbucket.org/atlassian/atlaskit/commits/a2792e5))
* change skate version to the previous one ([f691364](https://bitbucket.org/atlassian/atlaskit/commits/f691364))
* definition of the component ([92fbefd](https://bitbucket.org/atlassian/atlaskit/commits/92fbefd))
* demo page ([2c2ddf6](https://bitbucket.org/atlassian/atlaskit/commits/2c2ddf6))
* fixed troubles with switching between stories ([d0fe678](https://bitbucket.org/atlassian/atlaskit/commits/d0fe678))
* remove string attr from target ([26ed13d](https://bitbucket.org/atlassian/atlaskit/commits/26ed13d))
### Features
* "doNotMoveInDOM" property (tether fork) ([6405bdc](https://bitbucket.org/atlassian/atlaskit/commits/6405bdc))
* animated and tethered properly ([bbb12b1](https://bitbucket.org/atlassian/atlaskit/commits/bbb12b1))
* return using layer into inline-dialog ([9a905d2](https://bitbucket.org/atlassian/atlaskit/commits/9a905d2))
* switch to the newest skate ([5e1e0b1](https://bitbucket.org/atlassian/atlaskit/commits/5e1e0b1))
* Tether for layer ([bf82152](https://bitbucket.org/atlassian/atlaskit/commits/bf82152))
* Three new stories for inline-dialog ([01c11fd](https://bitbucket.org/atlassian/atlaskit/commits/01c11fd))
<a name="ak-layer@1.0.0"></a>
# ak-layer@1.0.0 (2016-06-24)
### Bug Fixes
* fix Alignment import ([7da854c](https://bitbucket.org/atlassian/atlaskit/commits/7da854c))
* inline dialog text position ([91487bf](https://bitbucket.org/atlassian/atlaskit/commits/91487bf))
* tethering destruction ([a321f83](https://bitbucket.org/atlassian/atlaskit/commits/a321f83))
### Features
* add horizontal snapping for animation ([344f2d3](https://bitbucket.org/atlassian/atlaskit/commits/344f2d3))
* inline dialog almost styled and animated ([f134e37](https://bitbucket.org/atlassian/atlaskit/commits/f134e37))
* inline dialog and layer backbone ([bfbe44b](https://bitbucket.org/atlassian/atlaskit/commits/bfbe44b))
* inline dialog and layer backbone - added missing changes ([3f14e28](https://bitbucket.org/atlassian/atlaskit/commits/3f14e28))
<a name="0.0.1-atlas-animation3"></a>
## 0.0.1-atlas-animation3 (2016-06-08)
<a name="1.1.6-atlas-animation"></a>
## 1.1.6-atlas-animation (2016-06-08)
<a name="13.1.0-tmp-atlaskit-component-b"></a>
# 13.1.0-tmp-atlaskit-component-b (2016-06-08)
<a name="13.1.0-tmp-atlaskit-component-a"></a>
# 13.1.0-tmp-atlaskit-component-a (2016-06-08)
### Bug Fixes
* **components:** commented out a line ([4b91174](https://bitbucket.org/atlassian/atlaskit/commits/4b91174))
### Features
* **components:** Add an ! mark ([2b7bdb0](https://bitbucket.org/atlassian/atlaskit/commits/2b7bdb0))
!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("skatejs"), require("akutil-common")) : "function" == typeof define && define.amd ? define([ "skatejs", "akutil-common" ], factory) : "object" == typeof exports ? exports.akLayer = factory(require("skatejs"), require("akutil-common")) : root.akLayer = factory(root.skatejs, root["akutil-common"]);
}(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory(require("skatejs"), require("popper.js"), require("object-assign"), require("akutil-common")) : "function" == typeof define && define.amd ? define([ "skatejs", "popper.js", "object-assign", "akutil-common" ], factory) : "object" == typeof exports ? exports.akLayer = factory(require("skatejs"), require("popper.js"), require("object-assign"), require("akutil-common")) : root.akLayer = factory(root.skatejs, root["popper.js"], root["object-assign"], root["akutil-common"]);
}(this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {
/******/

@@ -72,6 +72,11 @@ return function(modules) {

"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.CONSTRAIN_ATTRIBUTE_ENUM = exports.POSITION_ATTRIBUTE_ENUM = void 0;
var _skatejs = __webpack_require__(1), _akutilCommon = __webpack_require__(2), POSITION_ATTRIBUTE_ENUM = exports.POSITION_ATTRIBUTE_ENUM = {
var _skatejs = __webpack_require__(1), _Alignment = __webpack_require__(2), _Alignment2 = _interopRequireDefault(_Alignment), _akutilCommon = __webpack_require__(5), POSITION_ATTRIBUTE_ENUM = exports.POSITION_ATTRIBUTE_ENUM = {
attribute: "position",

@@ -86,3 +91,11 @@ 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" ],

invalidDefault: "window"
}, definition = {
};
/**
* @description The definition for the Layer component.
* @class Layer
* @example @html <ak-layer target="#target"></ak-layer>
* @example @js import Layer from 'ak-layer';
* const myLayer = new Layer();
*/
exports["default"] = (0, _skatejs.define)("ak-layer", {
props: {

@@ -138,13 +151,24 @@ /* eslint-disable max-len */

},
onRender: {}
onRender: {},
boundariesElement: {
attribute: !0
},
enableFlip: _skatejs.prop["boolean"]({
attribute: !0
})
},
observedAttributes: [ "class" ],
attributeChanged: function(elem, data) {
if (elem.alignment && data.newValue) {
var newPosition = elem.alignment.getPositionFromClasses(data.newValue);
newPosition && newPosition !== elem.actualPosition && (elem.actualPosition = newPosition);
prototype: {
reposition: function() {
return this.alignment && this.alignment.reposition(), this;
}
},
attached: function(elem) {
elem.alignment ? (elem.alignment.enable(), elem.alignment.update(elem)) : elem.alignment = new _akutilCommon.Alignment(elem);
var options = {
elem: elem.positionedDOM,
target: elem.target,
position: elem.position,
enableFlip: elem.enableFlip
};
elem.boundariesElement && (options.boundariesElement = elem.boundariesElement),
elem.alignment = new _Alignment2["default"](options);
},

@@ -155,7 +179,8 @@ detached: function(elem) {

render: function(elem) {
return elem.alignment && elem.alignment.update(elem), elem.onRender && elem.onRender(elem),
_skatejs.vdom.elementVoid("slot");
return elem.alignment && elem.alignment.reposition(), elem.onRender && elem.onRender(elem),
_skatejs.vdom.elementOpen("div", null, null, "ref", function(el) {
return elem.positionedDOM = el;
}), _skatejs.vdom.elementVoid("slot"), _skatejs.vdom.elementClose("div");
}
};
exports["default"] = (0, _skatejs.define)("ak-layer", definition);
});
}, /* 1 */

@@ -167,5 +192,149 @@ /***/

/***/
function(module, exports, __webpack_require__) {
"use strict";
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
"value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
Constructor;
};
}(), _popper = __webpack_require__(3), _popper2 = _interopRequireDefault(_popper), _objectAssign = __webpack_require__(4), _objectAssign2 = _interopRequireDefault(_objectAssign), Alignment = function() {
/**
* @description Create an alignment.
* @param {object} elem - Options
*/
function Alignment(options) {
if (_classCallCheck(this, Alignment), options.target && options.elem) {
var _constructor = this.constructor, defaultPosition = _constructor.defaultPosition, getElement = _constructor.getElement, attachmentMap = _constructor.attachmentMap, opts = (0,
_objectAssign2["default"])({
position: defaultPosition
}, options), position = attachmentMap[opts.position] ? attachmentMap[opts.position].position : attachmentMap[defaultPosition].position, popperOptions = {
placement: position,
modifiers: {}
};
options.boundariesElement && (popperOptions.boundariesElement = getElement(options.boundariesElement)),
options.enableFlip || (popperOptions.modifiers.preventOverflow = {
enabled: !1
}, popperOptions.modifiers.flip = {
enabled: !1
}), this.popper = new _popper2["default"](getElement(opts.target), getElement(opts.elem), popperOptions),
opts.onUpdate && this.popper.onUpdate(opts.onUpdate), opts.onCreate && this.popper.onCreate(opts.onCreate);
}
}
/**
* @description Disable positioning and destroy element.
* Being used in the ak-layer component on the 'detached' event
* @example @js alignment.destroy();
*/
return _createClass(Alignment, [ {
key: "destroy",
value: function() {
return this.popper && this.popper.destroy(), this;
}
}, {
key: "reposition",
value: function() {
return this.popper && this.popper.update(), this;
}
} ], [ {
key: "getElement",
value: function(node) {
if ("string" == typeof node) {
var elements = document.querySelectorAll(node);
return elements[0];
}
return node || document.body;
}
}, {
key: "defaultPosition",
get: function() {
return "right middle";
}
}, {
key: "attachmentMap",
get: function() {
return {
"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"
}
};
}
} ]), Alignment;
}();
exports["default"] = Alignment;
}, /* 3 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
}, /* 4 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
}, /* 5 */
/***/
function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_5__;
} ]);
});

2

dist/bundle.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("skatejs"),require("akutil-common")):"function"==typeof define&&define.amd?define(["skatejs","akutil-common"],e):"object"==typeof exports?exports.akLayer=e(require("skatejs"),require("akutil-common")):t.akLayer=e(t.skatejs,t["akutil-common"])}(this,function(t,e){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONSTRAIN_ATTRIBUTE_ENUM=e.POSITION_ATTRIBUTE_ENUM=void 0;var o=n(1),i=n(2),r=e.POSITION_ATTRIBUTE_ENUM={attribute:"position",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"],missingDefault:"right middle",invalidDefault:"right middle"},a=e.CONSTRAIN_ATTRIBUTE_ENUM={attribute:"constrain",values:["window","scrollParent"],missingDefault:"window",invalidDefault:"window"},l={props:{position:(0,i.enumeration)(r)({attribute:!0}),constrain:(0,i.enumeration)(a)({attribute:!0}),target:{attribute:!0},onRender:{}},observedAttributes:["class"],attributeChanged:function(t,e){if(t.alignment&&e.newValue){var n=t.alignment.getPositionFromClasses(e.newValue);n&&n!==t.actualPosition&&(t.actualPosition=n)}},attached:function(t){t.alignment?(t.alignment.enable(),t.alignment.update(t)):t.alignment=new i.Alignment(t)},detached:function(t){t.alignment&&t.alignment.destroy()},render:function(t){return t.alignment&&t.alignment.update(t),t.onRender&&t.onRender(t),o.vdom.elementVoid("slot")}};e["default"]=(0,o.define)("ak-layer",l)},function(e,n){e.exports=t},function(t,n){t.exports=e}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("skatejs"),require("popper.js"),require("object-assign"),require("akutil-common")):"function"==typeof define&&define.amd?define(["skatejs","popper.js","object-assign","akutil-common"],e):"object"==typeof exports?exports.akLayer=e(require("skatejs"),require("popper.js"),require("object-assign"),require("akutil-common")):t.akLayer=e(t.skatejs,t["popper.js"],t["object-assign"],t["akutil-common"])}(this,function(t,e,o,n){return function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CONSTRAIN_ATTRIBUTE_ENUM=e.POSITION_ATTRIBUTE_ENUM=void 0;var i=o(1),r=o(2),a=n(r),p=o(5),s=e.POSITION_ATTRIBUTE_ENUM={attribute:"position",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"],missingDefault:"right middle",invalidDefault:"right middle"},l=e.CONSTRAIN_ATTRIBUTE_ENUM={attribute:"constrain",values:["window","scrollParent"],missingDefault:"window",invalidDefault:"window"};e["default"]=(0,i.define)("ak-layer",{props:{position:(0,p.enumeration)(s)({attribute:!0}),constrain:(0,p.enumeration)(l)({attribute:!0}),target:{attribute:!0},onRender:{},boundariesElement:{attribute:!0},enableFlip:i.prop["boolean"]({attribute:!0})},prototype:{reposition:function(){return this.alignment&&this.alignment.reposition(),this}},attached:function(t){var e={elem:t.positionedDOM,target:t.target,position:t.position,enableFlip:t.enableFlip};t.boundariesElement&&(e.boundariesElement=t.boundariesElement),t.alignment=new a["default"](e)},detached:function(t){t.alignment&&t.alignment.destroy()},render:function(t){return t.alignment&&t.alignment.reposition(),t.onRender&&t.onRender(t),i.vdom.elementOpen("div",null,null,"ref",function(e){return t.positionedDOM=e}),i.vdom.elementVoid("slot"),i.vdom.elementClose("div")}})},function(e,o){e.exports=t},function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),a=o(3),p=n(a),s=o(4),l=n(s),u=function(){function t(e){if(i(this,t),e.target&&e.elem){var o=this.constructor,n=o.defaultPosition,r=o.getElement,a=o.attachmentMap,s=(0,l["default"])({position:n},e),u=a[s.position]?a[s.position].position:a[n].position,d={placement:u,modifiers:{}};e.boundariesElement&&(d.boundariesElement=r(e.boundariesElement)),e.enableFlip||(d.modifiers.preventOverflow={enabled:!1},d.modifiers.flip={enabled:!1}),this.popper=new p["default"](r(s.target),r(s.elem),d),s.onUpdate&&this.popper.onUpdate(s.onUpdate),s.onCreate&&this.popper.onCreate(s.onCreate)}}return r(t,[{key:"destroy",value:function(){return this.popper&&this.popper.destroy(),this}},{key:"reposition",value:function(){return this.popper&&this.popper.update(),this}}],[{key:"getElement",value:function(t){if("string"==typeof t){var e=document.querySelectorAll(t);return e[0]}return t||document.body}},{key:"defaultPosition",get:function(){return"right middle"}},{key:"attachmentMap",get:function(){return{"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"}}}}]),t}();e["default"]=u},function(t,o){t.exports=e},function(t,e){t.exports=o},function(t,e){t.exports=n}])});
{
"name": "ak-layer",
"version": "56.4.1",
"version": "57.0.0",
"description": "A layer component",

@@ -17,5 +17,7 @@ "main": "dist/bundle.js",

"dependencies": {
"akutil-common": "^0.2.0",
"akutil-common": "^2.0.0",
"akutil-shared-styles": "^33.0.2",
"skatejs": "v1.0.0-beta.12"
"object-assign": "^4.1.0",
"popper.js": "https://github.com/FezVrasta/popper.js#27069a2ed604a962d18e0e11b916ac9a1529e14a",
"skatejs": "^1.2.2"
},

@@ -22,0 +24,0 @@ "repository": {

# Layer
## Synopsis
A container responsible for the positioning of an element on a page

@@ -22,4 +20,4 @@

```
## Component API
## Layer API
* Properties

@@ -26,0 +24,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc