ninegrid2 6.804.0 → 6.807.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.
@@ -120908,11 +120908,16 @@ class nxCollapse extends HTMLElement {
120908
120908
  transform: scale(1.2); /* 살짝 확대 */
120909
120909
  }
120910
120910
 
120911
- ${shadowRoot ? ":host(.shrinking)" : ".shrinking"} {
120911
+ ${shadowRoot ? ":host(.nx-collapse)" : ".nx-collapse"} {
120912
120912
  animation: collapseShrink 0.7s ease forwards;
120913
120913
  pointer-events: none; /* 클릭 방지 */
120914
120914
  }
120915
-
120915
+
120916
+ ${shadowRoot ? ":host(.nx-expand)" : ".nx-expand"} {
120917
+ animation: expandShrink 0.6s ease forwards;
120918
+ pointer-events: none; /* 클릭 방지 */
120919
+ }
120920
+
120916
120921
  @keyframes collapseShrink {
120917
120922
  0% {
120918
120923
  opacity: 1;
@@ -120925,52 +120930,68 @@ class nxCollapse extends HTMLElement {
120925
120930
  transform-origin: top right;
120926
120931
  }
120927
120932
  }
120933
+
120934
+ @keyframes expandShrink {
120935
+ 0% {
120936
+ opacity: 0;
120937
+ transform: scale(0.5);
120938
+ transform-origin: top right;
120939
+ }
120940
+ 100% {
120941
+ opacity: 1;
120942
+ transform: scale(1);
120943
+ transform-origin: top right;
120944
+ }
120945
+ }
120928
120946
  `;
120929
120947
 
120930
- console.log(style);
120931
-
120932
120948
  (shadowRoot || this.#target).appendChild(style);
120933
120949
 
120934
120950
  // collapse 시 target 숨기고 복원 버튼 등장
120935
120951
  collapseBtn.addEventListener("click", () => {
120936
120952
  // fade-out 클래스 먼저 넣고 → 일정 시간 후 display: none
120937
120953
  // STEP 1: 복원 버튼 애니메이션 시작 (살짝 빠르게 먼저 등장)
120938
- this.#target.classList.add("shrinking");
120954
+ this.#target.classList.add("nx-collapse");
120939
120955
 
120940
120956
  setTimeout(() => {
120941
120957
  // STEP 2: target이 줄어드는 shrinking 애니메이션 시작
120942
-
120943
120958
  this.style.display = "inline-block";
120944
- this.classList.add("appearing");
120959
+ this.classList.add("nx-collapse");
120945
120960
  }, 100); // appearing 시작 후 100ms 딜레이로 target 축소 시작
120946
120961
 
120947
120962
  setTimeout(() => {
120948
120963
  // STEP 3: 실제 target 숨기기
120949
120964
  this.#targetPrevDisplay = this.#target.style.display;
120950
120965
  this.#target.style.display = "none";
120951
- }, 800); // shrinking 애니메이션이 끝나고 실제 제거
120966
+ }, 500); // shrinking 애니메이션이 끝나고 실제 제거
120952
120967
  });
120953
120968
  }
120954
120969
 
120955
120970
  // 복원 시 target 보이고 복원 버튼 사라짐
120956
120971
  this.shadowRoot.querySelector("button").addEventListener("click", () => {
120957
- this.#target.classList.remove("shrinking");
120958
- this.classList.remove("appearing");
120972
+ this.#target.classList.remove("nx-collapse");
120973
+ this.classList.remove("nx-collapse");
120959
120974
 
120960
120975
  this.#target.style.display = this.#targetPrevDisplay;
120961
120976
  this.style.display = "none";
120962
120977
  });
120963
- }
120964
120978
 
120965
- #setupToggle = () => {
120966
- const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
120967
- const searchContainer = this.shadowRoot.querySelector(".search-container");
120979
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
120980
+ // STEP 1: 복원 대상에 애니메이션 클래스 부여
120981
+ this.#target.classList.remove("nx-collapse");
120982
+ this.#target.classList.add("nx-expand"); // expandReveal 적용
120968
120983
 
120969
- toggleIcon.addEventListener("click", () => {
120970
- this.isCollapsed = !this.isCollapsed;
120971
- //toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
120972
- searchContainer.classList.toggle("collapse", this.isCollapsed);
120984
+ // STEP 2: 실제 화면에 표시
120985
+ this.#target.style.display = this.#targetPrevDisplay;
120986
+ this.style.display = "none"; // 복원 버튼은 사라짐
120987
+
120988
+ // STEP 3: 애니메이션이 끝난 후 pointer-events 복구 (선택적)
120989
+ setTimeout(() => {
120990
+ this.#target.classList.remove("nx-expand");
120991
+ //this.#target.style.pointerEvents = "auto";
120992
+ }, 600); // 애니메이션과 동일한 시간
120973
120993
  });
120994
+
120974
120995
  }
120975
120996
  }
120976
120997
 
@@ -120904,11 +120904,16 @@ class nxCollapse extends HTMLElement {
120904
120904
  transform: scale(1.2); /* 살짝 확대 */
120905
120905
  }
120906
120906
 
120907
- ${shadowRoot ? ":host(.shrinking)" : ".shrinking"} {
120907
+ ${shadowRoot ? ":host(.nx-collapse)" : ".nx-collapse"} {
120908
120908
  animation: collapseShrink 0.7s ease forwards;
120909
120909
  pointer-events: none; /* 클릭 방지 */
120910
120910
  }
120911
-
120911
+
120912
+ ${shadowRoot ? ":host(.nx-expand)" : ".nx-expand"} {
120913
+ animation: expandShrink 0.6s ease forwards;
120914
+ pointer-events: none; /* 클릭 방지 */
120915
+ }
120916
+
120912
120917
  @keyframes collapseShrink {
120913
120918
  0% {
120914
120919
  opacity: 1;
@@ -120921,52 +120926,68 @@ class nxCollapse extends HTMLElement {
120921
120926
  transform-origin: top right;
120922
120927
  }
120923
120928
  }
120929
+
120930
+ @keyframes expandShrink {
120931
+ 0% {
120932
+ opacity: 0;
120933
+ transform: scale(0.5);
120934
+ transform-origin: top right;
120935
+ }
120936
+ 100% {
120937
+ opacity: 1;
120938
+ transform: scale(1);
120939
+ transform-origin: top right;
120940
+ }
120941
+ }
120924
120942
  `;
120925
120943
 
120926
- console.log(style);
120927
-
120928
120944
  (shadowRoot || this.#target).appendChild(style);
120929
120945
 
120930
120946
  // collapse 시 target 숨기고 복원 버튼 등장
120931
120947
  collapseBtn.addEventListener("click", () => {
120932
120948
  // fade-out 클래스 먼저 넣고 → 일정 시간 후 display: none
120933
120949
  // STEP 1: 복원 버튼 애니메이션 시작 (살짝 빠르게 먼저 등장)
120934
- this.#target.classList.add("shrinking");
120950
+ this.#target.classList.add("nx-collapse");
120935
120951
 
120936
120952
  setTimeout(() => {
120937
120953
  // STEP 2: target이 줄어드는 shrinking 애니메이션 시작
120938
-
120939
120954
  this.style.display = "inline-block";
120940
- this.classList.add("appearing");
120955
+ this.classList.add("nx-collapse");
120941
120956
  }, 100); // appearing 시작 후 100ms 딜레이로 target 축소 시작
120942
120957
 
120943
120958
  setTimeout(() => {
120944
120959
  // STEP 3: 실제 target 숨기기
120945
120960
  this.#targetPrevDisplay = this.#target.style.display;
120946
120961
  this.#target.style.display = "none";
120947
- }, 800); // shrinking 애니메이션이 끝나고 실제 제거
120962
+ }, 500); // shrinking 애니메이션이 끝나고 실제 제거
120948
120963
  });
120949
120964
  }
120950
120965
 
120951
120966
  // 복원 시 target 보이고 복원 버튼 사라짐
120952
120967
  this.shadowRoot.querySelector("button").addEventListener("click", () => {
120953
- this.#target.classList.remove("shrinking");
120954
- this.classList.remove("appearing");
120968
+ this.#target.classList.remove("nx-collapse");
120969
+ this.classList.remove("nx-collapse");
120955
120970
 
120956
120971
  this.#target.style.display = this.#targetPrevDisplay;
120957
120972
  this.style.display = "none";
120958
120973
  });
120959
- }
120960
120974
 
120961
- #setupToggle = () => {
120962
- const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
120963
- const searchContainer = this.shadowRoot.querySelector(".search-container");
120975
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
120976
+ // STEP 1: 복원 대상에 애니메이션 클래스 부여
120977
+ this.#target.classList.remove("nx-collapse");
120978
+ this.#target.classList.add("nx-expand"); // expandReveal 적용
120964
120979
 
120965
- toggleIcon.addEventListener("click", () => {
120966
- this.isCollapsed = !this.isCollapsed;
120967
- //toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
120968
- searchContainer.classList.toggle("collapse", this.isCollapsed);
120980
+ // STEP 2: 실제 화면에 표시
120981
+ this.#target.style.display = this.#targetPrevDisplay;
120982
+ this.style.display = "none"; // 복원 버튼은 사라짐
120983
+
120984
+ // STEP 3: 애니메이션이 끝난 후 pointer-events 복구 (선택적)
120985
+ setTimeout(() => {
120986
+ this.#target.classList.remove("nx-expand");
120987
+ //this.#target.style.pointerEvents = "auto";
120988
+ }, 600); // 애니메이션과 동일한 시간
120969
120989
  });
120990
+
120970
120991
  }
120971
120992
  }
120972
120993
 
@@ -63,11 +63,16 @@ class nxCollapse extends HTMLElement {
63
63
  transform: scale(1.2); /* 살짝 확대 */
64
64
  }
65
65
 
66
- ${shadowRoot ? ":host(.shrinking)" : ".shrinking"} {
66
+ ${shadowRoot ? ":host(.nx-collapse)" : ".nx-collapse"} {
67
67
  animation: collapseShrink 0.7s ease forwards;
68
68
  pointer-events: none; /* 클릭 방지 */
69
69
  }
70
-
70
+
71
+ ${shadowRoot ? ":host(.nx-expand)" : ".nx-expand"} {
72
+ animation: expandShrink 0.6s ease forwards;
73
+ pointer-events: none; /* 클릭 방지 */
74
+ }
75
+
71
76
  @keyframes collapseShrink {
72
77
  0% {
73
78
  opacity: 1;
@@ -80,52 +85,68 @@ class nxCollapse extends HTMLElement {
80
85
  transform-origin: top right;
81
86
  }
82
87
  }
88
+
89
+ @keyframes expandShrink {
90
+ 0% {
91
+ opacity: 0;
92
+ transform: scale(0.5);
93
+ transform-origin: top right;
94
+ }
95
+ 100% {
96
+ opacity: 1;
97
+ transform: scale(1);
98
+ transform-origin: top right;
99
+ }
100
+ }
83
101
  `;
84
102
 
85
- console.log(style);
86
-
87
103
  (shadowRoot || this.#target).appendChild(style);
88
104
 
89
105
  // collapse 시 target 숨기고 복원 버튼 등장
90
106
  collapseBtn.addEventListener("click", () => {
91
107
  // fade-out 클래스 먼저 넣고 → 일정 시간 후 display: none
92
108
  // STEP 1: 복원 버튼 애니메이션 시작 (살짝 빠르게 먼저 등장)
93
- this.#target.classList.add("shrinking");
109
+ this.#target.classList.add("nx-collapse");
94
110
 
95
111
  setTimeout(() => {
96
112
  // STEP 2: target이 줄어드는 shrinking 애니메이션 시작
97
-
98
113
  this.style.display = "inline-block";
99
- this.classList.add("appearing");
114
+ this.classList.add("nx-collapse");
100
115
  }, 100); // appearing 시작 후 100ms 딜레이로 target 축소 시작
101
116
 
102
117
  setTimeout(() => {
103
118
  // STEP 3: 실제 target 숨기기
104
119
  this.#targetPrevDisplay = this.#target.style.display;
105
120
  this.#target.style.display = "none";
106
- }, 800); // shrinking 애니메이션이 끝나고 실제 제거
121
+ }, 500); // shrinking 애니메이션이 끝나고 실제 제거
107
122
  });
108
123
  }
109
124
 
110
125
  // 복원 시 target 보이고 복원 버튼 사라짐
111
126
  this.shadowRoot.querySelector("button").addEventListener("click", () => {
112
- this.#target.classList.remove("shrinking");
113
- this.classList.remove("appearing");
127
+ this.#target.classList.remove("nx-collapse");
128
+ this.classList.remove("nx-collapse");
114
129
 
115
130
  this.#target.style.display = this.#targetPrevDisplay;
116
131
  this.style.display = "none";
117
132
  });
118
- }
119
133
 
120
- #setupToggle = () => {
121
- const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
122
- const searchContainer = this.shadowRoot.querySelector(".search-container");
134
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
135
+ // STEP 1: 복원 대상에 애니메이션 클래스 부여
136
+ this.#target.classList.remove("nx-collapse");
137
+ this.#target.classList.add("nx-expand"); // expandReveal 적용
123
138
 
124
- toggleIcon.addEventListener("click", () => {
125
- this.isCollapsed = !this.isCollapsed;
126
- //toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
127
- searchContainer.classList.toggle("collapse", this.isCollapsed);
139
+ // STEP 2: 실제 화면에 표시
140
+ this.#target.style.display = this.#targetPrevDisplay;
141
+ this.style.display = "none"; // 복원 버튼은 사라짐
142
+
143
+ // STEP 3: 애니메이션이 끝난 후 pointer-events 복구 (선택적)
144
+ setTimeout(() => {
145
+ this.#target.classList.remove("nx-expand");
146
+ //this.#target.style.pointerEvents = "auto";
147
+ }, 600); // 애니메이션과 동일한 시간
128
148
  });
149
+
129
150
  }
130
151
  }
131
152
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.804.0",
4
+ "version": "6.807.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -63,11 +63,16 @@ class nxCollapse extends HTMLElement {
63
63
  transform: scale(1.2); /* 살짝 확대 */
64
64
  }
65
65
 
66
- ${shadowRoot ? ":host(.shrinking)" : ".shrinking"} {
66
+ ${shadowRoot ? ":host(.nx-collapse)" : ".nx-collapse"} {
67
67
  animation: collapseShrink 0.7s ease forwards;
68
68
  pointer-events: none; /* 클릭 방지 */
69
69
  }
70
-
70
+
71
+ ${shadowRoot ? ":host(.nx-expand)" : ".nx-expand"} {
72
+ animation: expandShrink 0.6s ease forwards;
73
+ pointer-events: none; /* 클릭 방지 */
74
+ }
75
+
71
76
  @keyframes collapseShrink {
72
77
  0% {
73
78
  opacity: 1;
@@ -80,52 +85,68 @@ class nxCollapse extends HTMLElement {
80
85
  transform-origin: top right;
81
86
  }
82
87
  }
88
+
89
+ @keyframes expandShrink {
90
+ 0% {
91
+ opacity: 0;
92
+ transform: scale(0.5);
93
+ transform-origin: top right;
94
+ }
95
+ 100% {
96
+ opacity: 1;
97
+ transform: scale(1);
98
+ transform-origin: top right;
99
+ }
100
+ }
83
101
  `;
84
102
 
85
- console.log(style);
86
-
87
103
  (shadowRoot || this.#target).appendChild(style);
88
104
 
89
105
  // collapse 시 target 숨기고 복원 버튼 등장
90
106
  collapseBtn.addEventListener("click", () => {
91
107
  // fade-out 클래스 먼저 넣고 → 일정 시간 후 display: none
92
108
  // STEP 1: 복원 버튼 애니메이션 시작 (살짝 빠르게 먼저 등장)
93
- this.#target.classList.add("shrinking");
109
+ this.#target.classList.add("nx-collapse");
94
110
 
95
111
  setTimeout(() => {
96
112
  // STEP 2: target이 줄어드는 shrinking 애니메이션 시작
97
-
98
113
  this.style.display = "inline-block";
99
- this.classList.add("appearing");
114
+ this.classList.add("nx-collapse");
100
115
  }, 100); // appearing 시작 후 100ms 딜레이로 target 축소 시작
101
116
 
102
117
  setTimeout(() => {
103
118
  // STEP 3: 실제 target 숨기기
104
119
  this.#targetPrevDisplay = this.#target.style.display;
105
120
  this.#target.style.display = "none";
106
- }, 800); // shrinking 애니메이션이 끝나고 실제 제거
121
+ }, 500); // shrinking 애니메이션이 끝나고 실제 제거
107
122
  });
108
123
  }
109
124
 
110
125
  // 복원 시 target 보이고 복원 버튼 사라짐
111
126
  this.shadowRoot.querySelector("button").addEventListener("click", () => {
112
- this.#target.classList.remove("shrinking");
113
- this.classList.remove("appearing");
127
+ this.#target.classList.remove("nx-collapse");
128
+ this.classList.remove("nx-collapse");
114
129
 
115
130
  this.#target.style.display = this.#targetPrevDisplay;
116
131
  this.style.display = "none";
117
132
  });
118
- }
119
133
 
120
- #setupToggle = () => {
121
- const toggleIcon = this.shadowRoot.querySelector(".toggle-icon");
122
- const searchContainer = this.shadowRoot.querySelector(".search-container");
134
+ this.shadowRoot.querySelector("button").addEventListener("click", () => {
135
+ // STEP 1: 복원 대상에 애니메이션 클래스 부여
136
+ this.#target.classList.remove("nx-collapse");
137
+ this.#target.classList.add("nx-expand"); // expandReveal 적용
123
138
 
124
- toggleIcon.addEventListener("click", () => {
125
- this.isCollapsed = !this.isCollapsed;
126
- //toggleIcon.innerHTML = this.isCollapsed ? "" : "X";
127
- searchContainer.classList.toggle("collapse", this.isCollapsed);
139
+ // STEP 2: 실제 화면에 표시
140
+ this.#target.style.display = this.#targetPrevDisplay;
141
+ this.style.display = "none"; // 복원 버튼은 사라짐
142
+
143
+ // STEP 3: 애니메이션이 끝난 후 pointer-events 복구 (선택적)
144
+ setTimeout(() => {
145
+ this.#target.classList.remove("nx-expand");
146
+ //this.#target.style.pointerEvents = "auto";
147
+ }, 600); // 애니메이션과 동일한 시간
128
148
  });
149
+
129
150
  }
130
151
  }
131
152