@lemonadejs/modal 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -22,8 +22,8 @@ declare namespace Modal {
22
22
  resizable?: boolean;
23
23
  /** Modal can be moved from its original position. Default: false */
24
24
  draggable?: boolean;
25
- /** Modal is automatic align center during initialization */
26
- center?: boolean;
25
+ /** Modal is automatic align during initialization */
26
+ position?: 'center' | 'left' | 'right' | undefined;
27
27
  /** Title of the modal */
28
28
  title?: string;
29
29
  /** Width of the modal */
@@ -66,7 +66,7 @@ declare namespace Modal {
66
66
  /** Modal can be moved from its original position. */
67
67
  draggable?: boolean;
68
68
  /** Modal is automatic align center during initialization */
69
- center?: boolean;
69
+ position?: string | undefined;
70
70
  /** Title of the modal */
71
71
  title?: string;
72
72
  /** Width of the modal */
package/dist/index.js CHANGED
@@ -269,7 +269,7 @@ if (!lemonade && typeof (require) === 'function') {
269
269
  }
270
270
 
271
271
  // Initial centralize
272
- if (self.center === true) {
272
+ if (self.position === 'center') {
273
273
  self.top = (window.innerHeight - self.height) / 2;
274
274
  self.left = (window.innerWidth - self.width) / 2;
275
275
  }
@@ -465,7 +465,7 @@ if (!lemonade && typeof (require) === 'function') {
465
465
  }
466
466
  }
467
467
 
468
- return `<div class="lm-modal" closed="{{self.closed}}" closable="{{self.closable}}" minimizable="{{self.minimizable}}" minimized="{{self.minimized}}" overflow="{{self.overflow}}" :top="self.top" :left="self.left" :width="self.width" :height="self.height" onmousedown="self.mousedown(e)" onmousemove="self.mousemove(e)" tabindex="-1">
468
+ return `<div class="lm-modal" position="{{self.position}}" closed="{{self.closed}}" closable="{{self.closable}}" minimizable="{{self.minimizable}}" minimized="{{self.minimized}}" overflow="{{self.overflow}}" :top="self.top" :left="self.left" :width="self.width" :height="self.height" onmousedown="self.mousedown(e)" onmousemove="self.mousemove(e)" tabindex="-1">
469
469
  <div class="lm-modal-title" data-icon="{{self.icon}}">{{self.title}}</div>
470
470
  <div>${template}</div>
471
471
  </div>`
package/dist/style.css CHANGED
@@ -45,13 +45,14 @@
45
45
  margin-right: 5px;
46
46
  }
47
47
 
48
- .lm-modal[closable="true"] .lm-modal-title::after {
48
+ .lm-modal[closable="true"]::after {
49
49
  content: 'close';
50
50
  width: 24px;
51
51
  height: 24px;
52
52
  font-size: 24px;
53
53
  font-family: "Material Icons";
54
54
  position: absolute;
55
+ top: 10px;
55
56
  right: 10px;
56
57
  cursor: pointer;
57
58
  }
@@ -143,4 +144,23 @@
143
144
 
144
145
  .lm-modal > div:last-child::-webkit-scrollbar-thumb {
145
146
  background: #888;
147
+ }
148
+
149
+ .lm-modal[position="left"] {
150
+ top: 0;
151
+ left: 0;
152
+ width: 280px;
153
+ height: 100vh;
154
+ border-width: 0;
155
+ border-radius: initial;
156
+ }
157
+
158
+ .lm-modal[position="right"] {
159
+ top: 0;
160
+ left: initial;
161
+ right: 0;
162
+ width: 280px;
163
+ height: 100vh;
164
+ border-width: 0;
165
+ border-radius: initial;
146
166
  }
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  },
18
18
  "main": "dist/index.js",
19
19
  "types": "dist/index.d.ts",
20
- "version": "2.4.3"
20
+ "version": "2.4.4"
21
21
  }