ninegrid2 6.775.0 → 6.779.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.
@@ -120873,7 +120873,7 @@ class nxCollapse extends HTMLElement {
120873
120873
  ${ninegrid.getCustomPath(this,"nxCollapse.css")}
120874
120874
  </style>
120875
120875
 
120876
- <div class="button"></div>
120876
+ <button></button>
120877
120877
  `;
120878
120878
 
120879
120879
  this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
@@ -120881,20 +120881,6 @@ class nxCollapse extends HTMLElement {
120881
120881
  if (this.#target && this.#target) {
120882
120882
  const collapseBtn = document.createElement("span");
120883
120883
  collapseBtn.className = "collapse-toggle";
120884
- /**
120885
- Object.assign(collapseBtn.style, {
120886
- position: "absolute",
120887
- top: "0",
120888
- right: "0",
120889
- cursor: "pointer",
120890
- width: "16px",
120891
- height: "16px",
120892
- border: "none",
120893
- "background-repeat": "no-repeat",
120894
- "background-position": "center",
120895
- "background-size": "auto",
120896
- "background-image": `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="darkgray" class="bi bi-box-arrow-in-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.364 13.5a.5.5 0 0 0 .5.5H13.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 13.5 1h-10A1.5 1.5 0 0 0 2 2.5v6.636a.5.5 0 1 0 1 0V2.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H6.864a.5.5 0 0 0-.5.5"/><path fill-rule="evenodd" d="M11 5.5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793l-8.147 8.146a.5.5 0 0 0 .708.708L10 6.707V10.5a.5.5 0 0 0 1 0z"/></svg>')`
120897
- }); */
120898
120884
 
120899
120885
  const shadowRoot = this.#target.shadowRoot;
120900
120886
  (shadowRoot || this.#target).appendChild(collapseBtn);
@@ -120934,7 +120920,7 @@ class nxCollapse extends HTMLElement {
120934
120920
  }
120935
120921
 
120936
120922
  // 복원 시 target 보이고 복원 버튼 사라짐
120937
- this.addEventListener("click", () => {
120923
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
120938
120924
  this.#target.style.display = this.#targetPrevDisplay;
120939
120925
  this.style.display = "none";
120940
120926
  });
@@ -120869,7 +120869,7 @@ class nxCollapse extends HTMLElement {
120869
120869
  ${ninegrid.getCustomPath(this,"nxCollapse.css")}
120870
120870
  </style>
120871
120871
 
120872
- <div class="button"></div>
120872
+ <button></button>
120873
120873
  `;
120874
120874
 
120875
120875
  this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
@@ -120877,20 +120877,6 @@ class nxCollapse extends HTMLElement {
120877
120877
  if (this.#target && this.#target) {
120878
120878
  const collapseBtn = document.createElement("span");
120879
120879
  collapseBtn.className = "collapse-toggle";
120880
- /**
120881
- Object.assign(collapseBtn.style, {
120882
- position: "absolute",
120883
- top: "0",
120884
- right: "0",
120885
- cursor: "pointer",
120886
- width: "16px",
120887
- height: "16px",
120888
- border: "none",
120889
- "background-repeat": "no-repeat",
120890
- "background-position": "center",
120891
- "background-size": "auto",
120892
- "background-image": `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="darkgray" class="bi bi-box-arrow-in-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.364 13.5a.5.5 0 0 0 .5.5H13.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 13.5 1h-10A1.5 1.5 0 0 0 2 2.5v6.636a.5.5 0 1 0 1 0V2.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H6.864a.5.5 0 0 0-.5.5"/><path fill-rule="evenodd" d="M11 5.5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793l-8.147 8.146a.5.5 0 0 0 .708.708L10 6.707V10.5a.5.5 0 0 0 1 0z"/></svg>')`
120893
- }); */
120894
120880
 
120895
120881
  const shadowRoot = this.#target.shadowRoot;
120896
120882
  (shadowRoot || this.#target).appendChild(collapseBtn);
@@ -120930,7 +120916,7 @@ class nxCollapse extends HTMLElement {
120930
120916
  }
120931
120917
 
120932
120918
  // 복원 시 target 보이고 복원 버튼 사라짐
120933
- this.addEventListener("click", () => {
120919
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
120934
120920
  this.#target.style.display = this.#targetPrevDisplay;
120935
120921
  this.style.display = "none";
120936
120922
  });
@@ -28,7 +28,7 @@ class nxCollapse extends HTMLElement {
28
28
  ${ninegrid.getCustomPath(this,"nxCollapse.css")}
29
29
  </style>
30
30
 
31
- <div class="button"></div>
31
+ <button></button>
32
32
  `;
33
33
 
34
34
  this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
@@ -36,20 +36,6 @@ class nxCollapse extends HTMLElement {
36
36
  if (this.#target && this.#target) {
37
37
  const collapseBtn = document.createElement("span");
38
38
  collapseBtn.className = "collapse-toggle";
39
- /**
40
- Object.assign(collapseBtn.style, {
41
- position: "absolute",
42
- top: "0",
43
- right: "0",
44
- cursor: "pointer",
45
- width: "16px",
46
- height: "16px",
47
- border: "none",
48
- "background-repeat": "no-repeat",
49
- "background-position": "center",
50
- "background-size": "auto",
51
- "background-image": `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="darkgray" class="bi bi-box-arrow-in-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.364 13.5a.5.5 0 0 0 .5.5H13.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 13.5 1h-10A1.5 1.5 0 0 0 2 2.5v6.636a.5.5 0 1 0 1 0V2.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H6.864a.5.5 0 0 0-.5.5"/><path fill-rule="evenodd" d="M11 5.5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793l-8.147 8.146a.5.5 0 0 0 .708.708L10 6.707V10.5a.5.5 0 0 0 1 0z"/></svg>')`
52
- }); */
53
39
 
54
40
  const shadowRoot = this.#target.shadowRoot;
55
41
  (shadowRoot || this.#target).appendChild(collapseBtn);
@@ -89,7 +75,7 @@ class nxCollapse extends HTMLElement {
89
75
  }
90
76
 
91
77
  // 복원 시 target 보이고 복원 버튼 사라짐
92
- this.addEventListener("click", () => {
78
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
93
79
  this.#target.style.display = this.#targetPrevDisplay;
94
80
  this.style.display = "none";
95
81
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.775.0",
4
+ "version": "6.779.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -28,7 +28,7 @@ class nxCollapse extends HTMLElement {
28
28
  ${ninegrid.getCustomPath(this,"nxCollapse.css")}
29
29
  </style>
30
30
 
31
- <div class="button"></div>
31
+ <button></button>
32
32
  `;
33
33
 
34
34
  this.shadowRoot.appendChild(htmlTmpl.content.cloneNode(true));
@@ -36,20 +36,6 @@ class nxCollapse extends HTMLElement {
36
36
  if (this.#target && this.#target) {
37
37
  const collapseBtn = document.createElement("span");
38
38
  collapseBtn.className = "collapse-toggle";
39
- /**
40
- Object.assign(collapseBtn.style, {
41
- position: "absolute",
42
- top: "0",
43
- right: "0",
44
- cursor: "pointer",
45
- width: "16px",
46
- height: "16px",
47
- border: "none",
48
- "background-repeat": "no-repeat",
49
- "background-position": "center",
50
- "background-size": "auto",
51
- "background-image": `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="darkgray" class="bi bi-box-arrow-in-up-right" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6.364 13.5a.5.5 0 0 0 .5.5H13.5a1.5 1.5 0 0 0 1.5-1.5v-10A1.5 1.5 0 0 0 13.5 1h-10A1.5 1.5 0 0 0 2 2.5v6.636a.5.5 0 1 0 1 0V2.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v10a.5.5 0 0 1-.5.5H6.864a.5.5 0 0 0-.5.5"/><path fill-rule="evenodd" d="M11 5.5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793l-8.147 8.146a.5.5 0 0 0 .708.708L10 6.707V10.5a.5.5 0 0 0 1 0z"/></svg>')`
52
- }); */
53
39
 
54
40
  const shadowRoot = this.#target.shadowRoot;
55
41
  (shadowRoot || this.#target).appendChild(collapseBtn);
@@ -89,7 +75,7 @@ class nxCollapse extends HTMLElement {
89
75
  }
90
76
 
91
77
  // 복원 시 target 보이고 복원 버튼 사라짐
92
- this.addEventListener("click", () => {
78
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
93
79
  this.#target.style.display = this.#targetPrevDisplay;
94
80
  this.style.display = "none";
95
81
  });