5.0.1 • Published 7 years ago

akutil-common v5.0.1

Weekly downloads
3
License
Apache-2.0
Repository
bitbucket
Last release
7 years ago

AtlasKit component registry Commitizen friendly semantic-release Report an issue Ask in our forum

AtlasKit common utilities

A set of common utilities for all AtlasKit components

Classes

Functions

  })

}

KeyPressHandler

A general class to deal with key activations

Kind: global class

new KeyPressHandler(key, callback, elem)

Adds a new keypress handler

ParamTypeDescription
keyStringA named key. Case insensitive.
callbackfunctionA callback function to invoke if the given key was activated. The callback is passed the event object.
elemNodeThe element to listen for the key activation. Defaults to document if none given.

keyPressHandler.add(key, callback)

Adds or replaces a key that is listened for.

Kind: instance method of KeyPressHandler

ParamTypeDescription
keyStringA named key. Case insensitive. Replaces any previous listened key.
callbackfunctionThe callback function to invoke.

keyPressHandler.destroy(key)

Removes a key from the list of listened keys. Or removes the whole listener if no key given.

Kind: instance method of KeyPressHandler

ParamTypeDescription
keyStringA named key. Case insensitive. If none given, event listener is removed.

computeBooleanValue()

Like el.hasAttribute(attr) but designed for use within a skate attribute change handler where you only have access to change.oldValue.

Kind: global function

enumeration()

This property extension can be used with skate. Usage:

props: {
    respondsTo: props.enum({values: ['toggle', 'hover'],
    missingDefault: 'toggle',
    invalidDefault: 'toggle'})({

    })
}

Kind: global function

Support and feedback

We're here to help!

Let us know what you think of our components and docs, your feedback is really important for us.

Community support

Ask a question in our forum.

Check if someone has already asked the same question before.

Create a support ticket

Are you in trouble? Let us know!

5.0.1

7 years ago

5.0.0

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago

3.0.0

7 years ago

2.8.0

8 years ago

2.7.1

8 years ago

2.7.0

8 years ago

2.6.3

8 years ago

2.6.2

8 years ago

2.6.0

8 years ago

2.5.0

8 years ago

2.4.4

8 years ago

2.4.3

8 years ago

2.4.2

8 years ago

2.4.1

8 years ago

2.4.0

8 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago