ninegrid2 6.734.0 → 6.736.0

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.
@@ -120870,26 +120870,7 @@ class nxTab extends HTMLElement {
120870
120870
  }
120871
120871
 
120872
120872
  connectedCallback() {
120873
- this.classList.add(this.getAttribute("theme") || "theme-1");
120874
- this.#renderTabs();
120875
- this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
120876
- tab.addEventListener('click', this.switchTabHandler);
120877
- });
120878
120873
 
120879
- const firstTab = this.shadowRoot.querySelector('.tab-button');
120880
- const firstContent = this.shadowRoot.querySelector('.tab-page');
120881
- if (firstTab && firstContent) {
120882
- firstTab.classList.add('active');
120883
- firstContent.classList.add('active');
120884
- setTimeout(() => {
120885
- this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120886
- }, 100);
120887
- //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120888
-
120889
- console.log(firstContent.style.height, firstContent.scrollHeight);
120890
- }
120891
-
120892
- this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120893
120874
 
120894
120875
  this.#init();
120895
120876
  }
@@ -120957,6 +120938,28 @@ class nxTab extends HTMLElement {
120957
120938
  };
120958
120939
 
120959
120940
  #init = () => {
120941
+
120942
+ this.classList.add(this.getAttribute("theme") || "theme-1");
120943
+ this.#renderTabs();
120944
+ this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
120945
+ tab.addEventListener('click', this.switchTabHandler);
120946
+ });
120947
+
120948
+ const firstTab = this.shadowRoot.querySelector('.tab-button');
120949
+ const firstContent = this.shadowRoot.querySelector('.tab-page');
120950
+ if (firstTab && firstContent) {
120951
+ firstTab.classList.add('active');
120952
+ firstContent.classList.add('active');
120953
+ setTimeout(() => {
120954
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120955
+ }, 100);
120956
+ //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120957
+
120958
+ console.log(firstContent.style.height, firstContent.scrollHeight);
120959
+ }
120960
+
120961
+ this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120962
+
120960
120963
  const resizeObserver = new ResizeObserver(() => {
120961
120964
  console.log("111");
120962
120965
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
@@ -120866,26 +120866,7 @@ class nxTab extends HTMLElement {
120866
120866
  }
120867
120867
 
120868
120868
  connectedCallback() {
120869
- this.classList.add(this.getAttribute("theme") || "theme-1");
120870
- this.#renderTabs();
120871
- this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
120872
- tab.addEventListener('click', this.switchTabHandler);
120873
- });
120874
120869
 
120875
- const firstTab = this.shadowRoot.querySelector('.tab-button');
120876
- const firstContent = this.shadowRoot.querySelector('.tab-page');
120877
- if (firstTab && firstContent) {
120878
- firstTab.classList.add('active');
120879
- firstContent.classList.add('active');
120880
- setTimeout(() => {
120881
- this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120882
- }, 100);
120883
- //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120884
-
120885
- console.log(firstContent.style.height, firstContent.scrollHeight);
120886
- }
120887
-
120888
- this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120889
120870
 
120890
120871
  this.#init();
120891
120872
  }
@@ -120953,6 +120934,28 @@ class nxTab extends HTMLElement {
120953
120934
  };
120954
120935
 
120955
120936
  #init = () => {
120937
+
120938
+ this.classList.add(this.getAttribute("theme") || "theme-1");
120939
+ this.#renderTabs();
120940
+ this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
120941
+ tab.addEventListener('click', this.switchTabHandler);
120942
+ });
120943
+
120944
+ const firstTab = this.shadowRoot.querySelector('.tab-button');
120945
+ const firstContent = this.shadowRoot.querySelector('.tab-page');
120946
+ if (firstTab && firstContent) {
120947
+ firstTab.classList.add('active');
120948
+ firstContent.classList.add('active');
120949
+ setTimeout(() => {
120950
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120951
+ }, 100);
120952
+ //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
120953
+
120954
+ console.log(firstContent.style.height, firstContent.scrollHeight);
120955
+ }
120956
+
120957
+ this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right'); });
120958
+
120956
120959
  const resizeObserver = new ResizeObserver(() => {
120957
120960
  console.log("111");
120958
120961
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
package/dist/nx/nxTab.js CHANGED
@@ -22,26 +22,7 @@ class nxTab extends HTMLElement {
22
22
  }
23
23
 
24
24
  connectedCallback() {
25
- this.classList.add(this.getAttribute("theme") || "theme-1");
26
- this.#renderTabs();
27
- this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
28
- tab.addEventListener('click', this.switchTabHandler);
29
- });
30
25
 
31
- const firstTab = this.shadowRoot.querySelector('.tab-button');
32
- const firstContent = this.shadowRoot.querySelector('.tab-page');
33
- if (firstTab && firstContent) {
34
- firstTab.classList.add('active');
35
- firstContent.classList.add('active');
36
- setTimeout(() => {
37
- this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
38
- }, 100);
39
- //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
40
-
41
- console.log(firstContent.style.height, firstContent.scrollHeight);
42
- }
43
-
44
- this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
45
26
 
46
27
  this.#init();
47
28
  }
@@ -109,6 +90,28 @@ class nxTab extends HTMLElement {
109
90
  };
110
91
 
111
92
  #init = () => {
93
+
94
+ this.classList.add(this.getAttribute("theme") || "theme-1");
95
+ this.#renderTabs();
96
+ this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
97
+ tab.addEventListener('click', this.switchTabHandler);
98
+ });
99
+
100
+ const firstTab = this.shadowRoot.querySelector('.tab-button');
101
+ const firstContent = this.shadowRoot.querySelector('.tab-page');
102
+ if (firstTab && firstContent) {
103
+ firstTab.classList.add('active');
104
+ firstContent.classList.add('active');
105
+ setTimeout(() => {
106
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
107
+ }, 100);
108
+ //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
109
+
110
+ console.log(firstContent.style.height, firstContent.scrollHeight);
111
+ }
112
+
113
+ this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
114
+
112
115
  const resizeObserver = new ResizeObserver(() => {
113
116
  console.log("111");
114
117
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.734.0",
4
+ "version": "6.736.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/nxTab.js CHANGED
@@ -22,26 +22,7 @@ class nxTab extends HTMLElement {
22
22
  }
23
23
 
24
24
  connectedCallback() {
25
- this.classList.add(this.getAttribute("theme") || "theme-1");
26
- this.#renderTabs();
27
- this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
28
- tab.addEventListener('click', this.switchTabHandler);
29
- });
30
25
 
31
- const firstTab = this.shadowRoot.querySelector('.tab-button');
32
- const firstContent = this.shadowRoot.querySelector('.tab-page');
33
- if (firstTab && firstContent) {
34
- firstTab.classList.add('active');
35
- firstContent.classList.add('active');
36
- setTimeout(() => {
37
- this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
38
- }, 100);
39
- //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
40
-
41
- console.log(firstContent.style.height, firstContent.scrollHeight);
42
- }
43
-
44
- this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
45
26
 
46
27
  this.#init();
47
28
  }
@@ -109,6 +90,28 @@ class nxTab extends HTMLElement {
109
90
  };
110
91
 
111
92
  #init = () => {
93
+
94
+ this.classList.add(this.getAttribute("theme") || "theme-1");
95
+ this.#renderTabs();
96
+ this.shadowRoot.querySelectorAll('.tab-button').forEach(tab => {
97
+ tab.addEventListener('click', this.switchTabHandler);
98
+ });
99
+
100
+ const firstTab = this.shadowRoot.querySelector('.tab-button');
101
+ const firstContent = this.shadowRoot.querySelector('.tab-page');
102
+ if (firstTab && firstContent) {
103
+ firstTab.classList.add('active');
104
+ firstContent.classList.add('active');
105
+ setTimeout(() => {
106
+ this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
107
+ }, 100);
108
+ //this.shadowRoot.querySelector('.tab-pages').style.height = `${firstContent.scrollHeight}px`;
109
+
110
+ console.log(firstContent.style.height, firstContent.scrollHeight);
111
+ }
112
+
113
+ this.shadowRoot.querySelectorAll('.tab-page:not(.active)').forEach(el => { el.classList.add('exit-right') });
114
+
112
115
  const resizeObserver = new ResizeObserver(() => {
113
116
  console.log("111");
114
117
  const activeContent = this.shadowRoot.querySelector('.tab-page.active');