@lemonadejs/modal 5.3.0 → 5.8.1

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.js CHANGED
@@ -390,7 +390,10 @@ if (!lemonade && typeof (require) === 'function') {
390
390
 
391
391
  if (self.position === 'absolute') {
392
392
  if (bottomEdgeDistance < 5) {
393
- transformY = (-1 * el.height) - margin - 20;
393
+ transformY = (-1 * el.height) - margin - 12;
394
+ if (el.top + transformY < 0) {
395
+ transformY = -el.top + 10;
396
+ }
394
397
  }
395
398
  } else {
396
399
  if (bottomEdgeDistance < 0) {
@@ -426,7 +429,7 @@ if (!lemonade && typeof (require) === 'function') {
426
429
  }
427
430
  }
428
431
 
429
- const Modal = function (template, { onchange, onload }) {
432
+ const Modal = function (template, { onchange, onload, track }) {
430
433
  let self = this;
431
434
  let backdrop = null;
432
435
  let elements = null;
@@ -831,7 +834,12 @@ if (!lemonade && typeof (require) === 'function') {
831
834
  }
832
835
  });
833
836
 
834
- return render => render`<div class="lm-modal" animation="{{self.animation}}" 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" tabindex="-1" role="modal" onmousedown="${mousedown}" onmousemove="${mousemove}" onclick="${click}">
837
+ track('top');
838
+ track('left');
839
+ track('width');
840
+ track('height');
841
+
842
+ return render => render`<div class="lm-modal" animation="{{self.animation}}" position="{{self.position}}" closed="{{self.closed}}" closable="{{self.closable}}" minimizable="{{self.minimizable}}" minimized="{{self.minimized}}" overflow="{{self.overflow}}" tabindex="-1" role="modal" onmousedown="${mousedown}" onmousemove="${mousemove}" onclick="${click}">
835
843
  <div class="lm-modal-title" data-title="{{self.title}}" data-icon="{{self.icon}}"><div class="lm-modal-icon">{{self.icon}}</div><div>{{self.title}}</div><div class="lm-modal-icon lm-modal-minimize" tabindex="0"></div><div class="lm-modal-icon lm-modal-close" tabindex="0"></div></div>
836
844
  <div :ref="self.root">${template}</div>
837
845
  </div>`
package/dist/style.css CHANGED
@@ -4,7 +4,7 @@
4
4
  min-height: 200px;
5
5
  border-radius: 5px;
6
6
  z-index: 15;
7
- background-color: var(--lm-background-color, #fff);
7
+ background-color: var(--lm-background-color-input, #fff);
8
8
  box-sizing: border-box;
9
9
  box-shadow: 0 0 12px rgb(0 0 0 / 22%);
10
10
  opacity: 1;
package/package.json CHANGED
@@ -13,9 +13,9 @@
13
13
  "modal js"
14
14
  ],
15
15
  "dependencies": {
16
- "lemonadejs": "^5.3.1"
16
+ "lemonadejs": "^5.3.6"
17
17
  },
18
18
  "main": "dist/index.js",
19
19
  "types": "dist/index.d.ts",
20
- "version": "5.3.0"
20
+ "version": "5.8.1"
21
21
  }