inviton-powerduck 0.0.203 → 0.0.205

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.
@@ -21,11 +21,54 @@ export default class ScrollUtils {
21
21
  (PowerduckState as any)._lastValidationScroll = now;
22
22
  }
23
23
 
24
- this.scrollToElem(scrollContext.first()[0]);
24
+ ScrollUtils.scrollIntoViewWithOffset(
25
+ scrollContext.first()[0],
26
+ 10,
27
+ 'smooth',
28
+ );
25
29
  }
26
30
  }, 10);
27
31
  }
28
32
 
33
+ static scrollIntoViewWithOffset(
34
+ elem,
35
+ offset = 0,
36
+ behavior: ScrollBehavior = 'smooth',
37
+ ) {
38
+ if (!elem) {
39
+ return;
40
+ }
41
+
42
+ // Find the nearest scrollable parent
43
+ let scrollParent = elem.parentElement;
44
+ while (scrollParent) {
45
+ const overflowY = getComputedStyle(scrollParent).overflowY;
46
+ if (overflowY === 'auto' || overflowY === 'scroll') {
47
+ break;
48
+ }
49
+
50
+ scrollParent = scrollParent.parentElement;
51
+ }
52
+
53
+ // Fallback to window scroll if no scrollable parent
54
+ if (!scrollParent) {
55
+ const elemTop = elem.getBoundingClientRect().top + window.pageYOffset;
56
+ window.scrollTo({
57
+ top: elemTop - offset,
58
+ behavior,
59
+ });
60
+ } else {
61
+ const parentRect = scrollParent.getBoundingClientRect();
62
+ const elemRect = elem.getBoundingClientRect();
63
+ const top = elemRect.top - parentRect.top + scrollParent.scrollTop;
64
+
65
+ scrollParent.scrollTo({
66
+ top: top - offset,
67
+ behavior,
68
+ });
69
+ }
70
+ }
71
+
29
72
  /**
30
73
  * Scrolls to element
31
74
  * @param elem
@@ -4,19 +4,21 @@ import TsxComponent, { Component } from '../../app/vuetsx';
4
4
  interface HtmlLiteralArgs {
5
5
  innerHTML: string;
6
6
  wrapAsDiv?: boolean;
7
+ cssClass?: string;
7
8
  }
8
9
 
9
10
  @Component
10
11
  class HtmlLiteralComponent extends TsxComponent<HtmlLiteralArgs> implements HtmlLiteralArgs {
11
12
  @Prop() innerHTML!: string;
12
13
  @Prop() wrapAsDiv: boolean;
14
+ @Prop() cssClass?: string;
13
15
 
14
16
  render(h) {
15
17
  if (this.innerHTML != null) {
16
18
  if (!this.wrapAsDiv) {
17
- return <span innerHTML={this.innerHTML}></span>;
19
+ return <span class={this.cssClass} innerHTML={this.innerHTML}></span>;
18
20
  } else {
19
- return <div innerHTML={this.innerHTML}></div>;
21
+ return <div class={this.cssClass} innerHTML={this.innerHTML}></div>;
20
22
  }
21
23
  }
22
24
  }
@@ -9,34 +9,34 @@
9
9
  padding-bottom: 20px;
10
10
  }
11
11
 
12
- .modal-header.modal-has-headericon > h5 {
12
+ .modal-header.modal-has-headericon>h5 {
13
13
  display: flex;
14
14
  width: 100%;
15
15
  min-height: 60px;
16
16
  align-items: center;
17
17
  }
18
18
 
19
- .modal-header.modal-has-headericon > .modal-header-icon {
19
+ .modal-header.modal-has-headericon>.modal-header-icon {
20
20
  position: absolute;
21
21
  top: 0;
22
22
  left: 22px;
23
23
  }
24
24
 
25
- .modal-header.modal-has-headericon > .modal-header-icon .swal2-transform-resize {
25
+ .modal-header.modal-has-headericon>.modal-header-icon .swal2-transform-resize {
26
26
  transform: scale(0.75);
27
27
  }
28
28
 
29
- .modal-header.modal-has-headericon > .modal-header-icon .swal2-transform-resize.swal2-icon,
30
- .modal-header.modal-has-headericon > .modal-header-icon .swal2-transform-resize .swal2-icon {
29
+ .modal-header.modal-has-headericon>.modal-header-icon .swal2-transform-resize.swal2-icon,
30
+ .modal-header.modal-has-headericon>.modal-header-icon .swal2-transform-resize .swal2-icon {
31
31
  margin-top: 10px;
32
32
  margin-left: -10px;
33
33
  }
34
34
 
35
- .modal-header.modal-has-headericon > .modal-header-icon .swal2-transform-resize .success-icon-stub {
35
+ .modal-header.modal-has-headericon>.modal-header-icon .swal2-transform-resize .success-icon-stub {
36
36
  border-color: #b9f0b7;
37
37
  }
38
38
 
39
- .modal-header.modal-has-headericon > .modal-header-icon .swal2-standard-resize {
39
+ .modal-header.modal-has-headericon>.modal-header-icon .swal2-standard-resize {
40
40
  font-size: 40px;
41
41
  line-height: 60px;
42
42
  text-align: center;
@@ -44,7 +44,7 @@
44
44
  height: 60px;
45
45
  }
46
46
 
47
- .modal-header.modal-has-headericon > .modal-header-icon > .swal2-icon {
47
+ .modal-header.modal-has-headericon>.modal-header-icon>.swal2-icon {
48
48
  overflow: hidden;
49
49
  }
50
50
 
@@ -73,6 +73,9 @@
73
73
  .modal-bottom-sheet .modal-dialog .modal-content {
74
74
  border-top-left-radius: 16px;
75
75
  border-top-right-radius: 16px;
76
+ border-bottom-left-radius: 0;
77
+ border-bottom-right-radius: 0;
78
+ max-height: calc(100dvh - 10px);
76
79
  padding-top: 0;
77
80
  }
78
81
 
@@ -124,7 +127,6 @@
124
127
  }
125
128
 
126
129
  .modal.modal-bottom-sheet .modal-body {
127
- max-height: 80vh;
128
130
  overflow: auto;
129
131
  }
130
132
 
@@ -148,4 +150,4 @@
148
150
  z-index: 1;
149
151
  background: inherit;
150
152
  }
151
- }
153
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.203",
4
+ "version": "0.0.205",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",