-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathakyral-modal.html
95 lines (67 loc) · 2.29 KB
/
akyral-modal.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="akyral-modal-behavior.html">
<!--
A responsive modal element.
## Using the element
### Nested content
Using the element is as simple as defining a `akyral-modal` element and nesting content
Example:
<akyral-modal>
I am content...
</akyral-modal>
### As a Behavior
You can use `akyral-modal` as a behavior
Example:
<dom-module name="new-modal">
<template>
<content></content>
</template>
<script>
Polymer({
is: 'demo-modal',
behaviors: [window.AkyralModalBehavior]
});
</script>
</dom-module>
## Configuration
### Type
Setting a type allows you to define a visual effect to the modal. You can
choose from the following types: `drop`, `flip`, `lift`, `slide`, `swing` and
`takeover`.
Example:
<akyral-modal type="flip"></akyral-modal>
### Position
Setting a position will set the visual effect's starting position. You can
choose from the following position: `top`, `left`, `bottom`, and `right`.
A modal with a type of `takeover` is not affected by position.
Example:
<akyral-modal type="slide" position="top"></akyral-modal>
### Pinned location
Setting the `pinned` attribute will pin the element to that side on the viewport.
This will override the position attribute. Only types of `swing` and `slide` support the pinned
attribute.
Example:
<akyral-modal type="slide" position="top" pinned="top"></akyral-modal>
## Accessiblity (a11y)
## Tab ordering
By default `akyral-modal` will allow tabbing into accessible items with it. It will maintain tab
focus within the modal until the escape key has been pressed or the modal has been closed.
## Suggestions
When marking up `akyral-modal`, it is recommended that the following standards are followed.
@element akyral-modal
@blurb Web component which allows for easy modal creation
@demo http://filaraujo.github.io/akyral.io/modal/index.html
@homepage https://github.com/filaraujo/akyral-modal
-->
<dom-module id="akyral-modal">
<link rel="import" type="css" href="akyral-modal.css">
<template>
<div
id="content"
role="dialog"
tabindex="-1">
<slot></slot>
</div>
</template>
</dom-module>
<script src="akyral-modal.js"></script>