Socket
Socket
Sign inDemoInstall

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.1.2 to 56.3.0

15

CHANGELOG.md

@@ -1,6 +0,16 @@

<a name="56.1.1"></a>
## 56.1.1 (2016-07-15)
<a name="56.1.2"></a>
## 56.1.2 (2016-07-18)
<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))
<a name="ak-layer@56.1.1"></a>

@@ -22,2 +32,3 @@ ## ak-layer@56.1.1 (2016-07-14)

* bricked release 0.0.9 ([20604da](https://bitbucket.org/atlassian/atlaskit/commits/20604da))
* remove string attr from target ([26ed13d](https://bitbucket.org/atlassian/atlaskit/commits/26ed13d))

@@ -24,0 +35,0 @@

79

dist/bundle.js

@@ -74,29 +74,64 @@ !function(root, factory) {

value: !0
});
var _skatejs = __webpack_require__(1), _akutilCommon = __webpack_require__(2), definition = {
}), 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 = {
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"
}, CONSTRAIN_ATTRIBUTE_ENUM = exports.CONSTRAIN_ATTRIBUTE_ENUM = {
attribute: "constrain",
values: [ "window", "scrollParent" ],
missingDefault: "window",
invalidDefault: "window"
}, definition = {
props: {
position: _skatejs.prop.string({
attribute: !0,
"default": "right middle"
/* eslint-disable max-len */
/**
* @description Position of a layer relative to it's target.
* The position attribute takes two positional arguments in the format `position="edge edge-position"`,
* where `edge` specifies what edge to align the layer to, and `edge-position` specifies where on that edge the layer should appear.
* Refer to the table below for examples:
*
* | | top left | top center | top right | |
* |-------------|-------------|---------------|--------------|--------------|
* | left top | | | | right top |
* | left middle | | target | | right middle |
* | left bottom | | | | right bottom |
* | | bottom left | bottom center | bottom right | |
* @memberof Layer
* @instance
* @default right middle
* @type {string}
* @example @html <ak-layer position="top left"></ak-layer>
* @example @js layer.position = 'top left';
*/
/* eslint-enable max-len */
position: (0, _akutilCommon.enumeration)(POSITION_ATTRIBUTE_ENUM)({
attribute: !0
}),
attachment: _skatejs.prop.string({
attribute: !0,
"default": "window"
/**
* @description Constrain a layer to a scrollable parent or the window
* @memberof Layer
* @instance
* @default 'window'
* @type String
* @example @html <ak-layer constrain="scrollParent"></ak-layer>
* @example @js layer.constrain = 'scrollParent'
*/
constrain: (0, _akutilCommon.enumeration)(CONSTRAIN_ATTRIBUTE_ENUM)({
attribute: !0
}),
/**
* @description Target of a layer.
* Selector or element on a page relative to which layer should be positioned
* @memberof Layer
* @instance
* @type String
* @example @html <ak-layer target="#target"></ak-layer>
* @example @js layer.target = document.body.querySelector('#target');
* @example @js layer.target = '#target'
*/
target: {
attribute: !0
},
renderElementTo: _skatejs.prop.string({
attribute: !0
}),
doNotMoveInDOM: _skatejs.prop["boolean"]({
attribute: !0,
"default": !0
}),
open: _skatejs.prop.string({
attribute: !0,
set: function(elem) {
elem.alignment && elem.alignment.reposition();
}
})
}
},

@@ -103,0 +138,0 @@ attached: function(elem) {

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("skatejs"),require("akutil-common")):"function"==typeof define&&define.amd?define(["skatejs","akutil-common"],t):"object"==typeof exports?exports.akLayer=t(require("skatejs"),require("akutil-common")):e.akLayer=t(e.skatejs,e["akutil-common"])}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(2),i={props:{position:o.prop.string({attribute:!0,"default":"right middle"}),attachment:o.prop.string({attribute:!0,"default":"window"}),target:{attribute:!0},renderElementTo:o.prop.string({attribute:!0}),doNotMoveInDOM:o.prop["boolean"]({attribute:!0,"default":!0}),open:o.prop.string({attribute:!0,set:function(e){e.alignment&&e.alignment.reposition()}})},attached:function(e){e.alignment?(e.alignment.enable(),e.alignment.update(e)):e.alignment=new r.Alignment(e)},detached:function(e){e.alignment&&e.alignment.destroy()},render:function(e){return e.alignment&&e.alignment.update(e),o.vdom.elementVoid("slot")}};t["default"]=(0,o.define)("ak-layer",i)},function(t,n){t.exports=e},function(e,n){e.exports=t}])});
!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}},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),o.vdom.elementVoid("slot")}};e["default"]=(0,o.define)("ak-layer",l)},function(e,n){e.exports=t},function(t,n){t.exports=e}])});
{
"name": "ak-layer",
"version": "56.1.2",
"version": "56.3.0",
"description": "A layer component",

@@ -19,3 +19,3 @@ "main": "dist/bundle.js",

"akutil-shared-styles": "*",
"skatejs": "v1.0.0-beta.10"
"skatejs": "v1.0.0-beta.12"
},

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

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

# ak-layer
# Layer
## Synopsis
A container responsible for the positioning of an element on a page
## Setup and install
```
npm install ak-layer
```
## Using the definition
The `ak-layer` package exports the Layer [skate](https://github.com/skatejs/skatejs) component:
```
import Layer from 'ak-layer';
const myLayer = new Layer();
```
## Component API
* Properties
* [`layer.position`](#Layer+position) : string
* [`layer.constrain`](#Layer+constrain) : String
* [`layer.target`](#Layer+target) : String
### Constructor
The definition for the Layer component.
**HTML Example**
```js
<ak-layer target="#target"></ak-layer>
```
**JS Example**
```js
import Layer from 'ak-layer';
const myLayer = new Layer();
```
### `layer.position` : string
Position of a layer relative to it's target.
The position attribute takes two positional arguments in the format `position="edge edge-position"`,
where `edge` specifies what edge to align the layer to, and `edge-position` specifies where on that edge the layer should appear.
Refer to the table below for examples:
| | top left | top center | top right | |
|-------------|-------------|---------------|--------------|--------------|
| left top | | | | right top |
| left middle | | target | | right middle |
| left bottom | | | | right bottom |
| | bottom left | bottom center | bottom right | |
**Kind**: instance property of Layer
**Default**: `"right middle"`
**HTML Example**
```js
<ak-layer position="top left"></ak-layer>
```
**JS Example**
```js
layer.position = 'top left';
```
### `layer.constrain` : String
Constrain a layer to a scrollable parent or the window
**Kind**: instance property of Layer
**Default**: `'window'`
**HTML Example**
```js
<ak-layer constrain="scrollParent"></ak-layer>
```
**JS Example**
```js
layer.constrain = 'scrollParent'
```
### `layer.target` : String
Target of a layer.
Selector or element on a page relative to which layer should be positioned
**Kind**: instance property of Layer
**HTML Example**
```js
<ak-layer target="#target"></ak-layer>
```
**JS Example**
```js
layer.target = document.body.querySelector('#target');
```
**JS Example**
```js
layer.target = '#target'
```
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